Trait bolero::Driver[][src]

pub trait Driver {
    fn mode(&self) -> DriverMode;
fn fill_bytes(&mut self, bytes: &mut [u8]) -> Option<()>; fn gen<T>(&mut self) -> Option<T>
    where
        T: TypeGenerator
, { ... } }
Expand description

Trait for driving the generation of a value

In a test engine, this is typically backed by a byte slice, but other drivers can be used instead, e.g. an RNG implementation.

Required methods

Return the mode set for the driver

Fill the target bytes with the driver state

Provided methods

Generate a value with type T

Implementations on Foreign Types

Implementors