[][src]Trait bolero_generator::driver::Driver

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

Trait for driving the generation of a value

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

Required methods

fn mode(&self) -> DriverMode

Return the mode set for the driver

fn fill_bytes(&mut self, bytes: &mut [u8]) -> Option<()>

Fill the target bytes with the driver state

Loading content...

Provided methods

fn gen<T: TypeGenerator>(&mut self) -> Option<T>

Generate a value with type T

Loading content...

Implementors

impl<'a> Driver for ByteSliceDriver<'a>[src]

impl<R: RngCore> Driver for DirectRng<R>[src]

impl<R: RngCore> Driver for ForcedRng<R>[src]

Loading content...