pub trait Generator<T> {
// Required methods
fn generate(&self, rng: &mut dyn RngCore, config: &GeneratorConfig) -> T;
fn shrink(&self, value: &T) -> Box<dyn Iterator<Item = T>>;
}Expand description
Core generator trait for creating random test data
Required Methods§
Sourcefn generate(&self, rng: &mut dyn RngCore, config: &GeneratorConfig) -> T
fn generate(&self, rng: &mut dyn RngCore, config: &GeneratorConfig) -> T
Generate a random value of type T using the provided RNG and configuration