Crate fixt

source ·


pub use paste;


@todo move all this out to the serialized bytes crate


implement Iterator for a FooFixturator for a given curve
Creates a simple way to generate enums that use the strum way of iterating iterates over all the variants (Predictable) or selects random variants (Unpredictable) You do still need to BYO “empty” variant as the macro doesn’t know what to use there
tiny convenience macro to make it easy to get the first Foo from its fixturator without using the iterator interface to save a little typing c.f. fixt!(Foo) vs. FooFixturator::new(Unpredictable).next().unwrap();
implements a FooFixturator for any type Foo this simply wraps Fixturator<Foo, Curve> up as FooFixturator<Curve>
a direct delegation of fixtures to the inner type for new types
a direct delegation of fixtures to the inner type for wasm io types See zome types crate


represents a curve over the empty value(s) the concept of “empty” is as slippery as it is of dubious value how many countless hours and bugs have we lost over deciding what “is” and what “isn’t”? i’m looking at you, JS and PHP -_-
the Fixturator is the struct that we wrap in our FooFixturator newtypes to impl Iterator over each combination of Item and Curve needs its own Iterator implementation for Fixturator Item is the Foo type of FooFixturator, i.e. the type of thing we are generating examples of Curve represents some algorithm capable of generating fixtures the Item is PhantomData because it simply represents a type to output the Curve must be provided when the Fixturator is constructed to allow for paramaterized curves this is most easily handled in most cases with the fixturator! and newtype_fixturator! macros
represents a predictable curve
represents an unpredictable curve


Access the seeded random number generator. This should be used in all places where tests produce random values.