MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / generate_array_of

Function generate_array_of

crates/sats/src/proptest.rs:178–187  ·  view source on GitHub ↗

Generates an array value given an element generator `gen_elem`.

(gen_elem: S)

Source from the content-addressed store, hash-verified

176
177/// Generates an array value given an element generator `gen_elem`.
178fn generate_array_of<S>(gen_elem: S) -> BoxedStrategy<ArrayValue>
179where
180 S: Strategy + 'static,
181 Box<[S::Value]>: 'static + Into<ArrayValue>,
182{
183 vec(gen_elem, 0..=SIZE)
184 .prop_map(Vec::into_boxed_slice)
185 .prop_map_into()
186 .boxed()
187}
188
189/// Generates an array value with elements typed at `ty`.
190fn generate_array_value(ty: AlgebraicType) -> BoxedStrategy<ArrayValue> {

Callers 1

generate_array_valueFunction · 0.85

Calls 1

vecFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…