[][src]Struct bolero::TestTarget

pub struct TestTarget<Generator, Engine> { /* fields omitted */ }

Configuration for a fuzz target

Methods

impl<Engine> TestTarget<SliceGenerator, Engine>[src]

pub fn new(engine: Engine) -> TestTarget<SliceGenerator, Engine>[src]

Create a TestTarget for a given file

impl<G, Engine> TestTarget<G, Engine>[src]

pub fn with_generator<NewG: ValueGenerator>(
    self,
    generator: NewG
) -> TestTarget<NewG, Engine>
[src]

Set the value generator for the TestTarget

pub fn with_type<T: TypeGenerator>(
    self
) -> TestTarget<TypeValueGenerator<T>, Engine>
[src]

Set the type generator for the TestTarget

impl<G: ValueGenerator, Engine> TestTarget<G, Engine>[src]

pub fn map<F: Fn(G::Output) -> T, T>(
    self,
    map: F
) -> TestTarget<MapGenerator<G, F>, Engine>
[src]

Map the value of the generator

pub fn and_then<F: Fn(G::Output) -> T, T: ValueGenerator>(
    self,
    map: F
) -> TestTarget<AndThenGenerator<G, F>, Engine>
[src]

Map the value of the generator with a new generator

pub fn filter<F: Fn(&G::Output) -> bool>(
    self,
    filter: F
) -> TestTarget<FilterGenerator<G, F>, Engine>
[src]

Filter the value of the generator

pub fn filter_map<F: Fn(G::Output) -> Option<T>, T>(
    self,
    filter_map: F
) -> TestTarget<FilterMapGenerator<G, F>, Engine>
[src]

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

pub fn with_driver_mode(self, mode: DriverMode) -> Self[src]

Set the driver mode for the fuzz target

impl<G> TestTarget<G, RngEngine>[src]

pub fn with_iterations(self, iterations: usize) -> Self[src]

Set the number of iterations executed

pub fn with_max_len(self, max_len: usize) -> Self[src]

Set the maximum length of the generated bytes

impl<G, E> TestTarget<G, E> where
    G: ValueGenerator
[src]

pub fn for_each<F>(self, test: F) -> E::Output where
    E: Engine<GeneratorTest<F, G>>,
    GeneratorTest<F, G>: Test
[src]

Iterate over all of the inputs and check the TestTarget

impl<E> TestTarget<SliceGenerator, E>[src]

pub fn for_each<T, Ret>(self, test: T) -> E::Output where
    E: Engine<T>,
    T: Test + FnMut(&[u8]) -> Ret, 
[src]

Iterate over all of the inputs and check the TestTarget

Auto Trait Implementations

impl<Generator, Engine> RefUnwindSafe for TestTarget<Generator, Engine> where
    Engine: RefUnwindSafe,
    Generator: RefUnwindSafe

impl<Generator, Engine> Send for TestTarget<Generator, Engine> where
    Engine: Send,
    Generator: Send

impl<Generator, Engine> Sync for TestTarget<Generator, Engine> where
    Engine: Sync,
    Generator: Sync

impl<Generator, Engine> Unpin for TestTarget<Generator, Engine> where
    Engine: Unpin,
    Generator: Unpin

impl<Generator, Engine> UnwindSafe for TestTarget<Generator, Engine> where
    Engine: UnwindSafe,
    Generator: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,