pub trait ValueGenerator: Sized {
    type Output;

    fn generate<D>(&self, driver: &mut D) -> Option<Self::Output>
    where
        D: Driver
; fn mutate<D>(&self, driver: &mut D, value: &mut Self::Output) -> Option<()>
    where
        D: Driver
, { ... } fn map<F, T>(self, map: F) -> MapGenerator<Self, F>
    where
        F: Fn(Self::Output) -> T
, { ... } fn map_gen<F, T>(self, map: F) -> MapGenerator<Self, F>
    where
        F: Fn(Self::Output) -> T
, { ... } fn and_then<F, T>(self, and_then: F) -> AndThenGenerator<Self, F>
    where
        F: Fn(Self::Output) -> T,
        T: ValueGenerator
, { ... } fn and_then_gen<F, T>(self, and_then: F) -> AndThenGenerator<Self, F>
    where
        F: Fn(Self::Output) -> T,
        T: ValueGenerator
, { ... } fn filter<F>(self, filter: F) -> FilterGenerator<Self, F>
    where
        F: Fn(&Self::Output) -> bool
, { ... } fn filter_gen<F>(self, filter: F) -> FilterGenerator<Self, F>
    where
        F: Fn(&Self::Output) -> bool
, { ... } fn filter_map<F, T>(self, filter_map: F) -> FilterMapGenerator<Self, F>
    where
        F: Fn(Self::Output) -> Option<T>
, { ... } fn filter_map_gen<F, T>(self, filter_map: F) -> FilterMapGenerator<Self, F>
    where
        F: Fn(Self::Output) -> Option<T>
, { ... } }
Expand description

Generate a value with a parameterized generator

Required Associated Types

Required Methods

Generates a value with the given driver

Provided Methods

Mutates an existing value with the given driver

Map the value of a generator

Map the value of a generator, exists to reduce conflicts with other map functions.

Map the value of a generator with a new generator

Map the value of a generator with a new generator, exists to reduce conflicts with other map functions.

Filter the value of a generator

Filter the value of a generator, exists to reduce conflicts with other filter functions.

Filter the value of a generator and map it to something else

Filter the value of a generator and map it to something else, exists to reduce conflicts with other filter_map functions.

Implementations on Foreign Types

Implementors