Input

Trait Input 

Source
pub trait Input<Output> {
    type Driver: Driver + RefUnwindSafe;

    // Required methods
    fn with_slice<F: FnMut(&[u8]) -> Output>(&mut self, f: &mut F) -> Output;
    fn with_driver<F: FnMut(&mut Self::Driver) -> Output>(
        &mut self,
        f: &mut F,
    ) -> Output;
}

Required Associated Types§

Required Methods§

Source

fn with_slice<F: FnMut(&[u8]) -> Output>(&mut self, f: &mut F) -> Output

Provide a slice of the test input

Source

fn with_driver<F: FnMut(&mut Self::Driver) -> Output>( &mut self, f: &mut F, ) -> Output

Provide a test driver for the test input

Note: Drivers are used with bolero_generator::ValueGenerator implementations.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, Output> Input<Output> for &'a [u8]

Source§

type Driver = ByteSliceDriver<'a>

Source§

fn with_slice<F: FnMut(&[u8]) -> Output>(&mut self, f: &mut F) -> Output

Source§

fn with_driver<F: FnMut(&mut Self::Driver) -> Output>( &mut self, f: &mut F, ) -> Output

Implementors§

Source§

impl<'a, Output> Input<Output> for Bytes<'a>