Trait monkey_test::Gen

source ·
pub trait Gen<A>: Clone {
    // Required method
    fn iter(&self, seed: u64) -> Box<dyn Iterator<Item = A>>;
}
Expand description

The generator trait, for producing example values to test in a property.

Required Methods§

source

fn iter(&self, seed: u64) -> Box<dyn Iterator<Item = A>>

Produce a example iterator from the generator, given a randomization seed.

Implementors§

source§

impl Gen<u8> for RandU8Gen

source§

impl<A: 'static + Clone, GA: Gen<A>> Gen<Vec<A, Global>> for RandVecGen<A, GA>

source§

impl<T: Clone + 'static> Gen<T> for SliceGen<T>