pub trait SensorAndPool: SaveToStatsFolder {
    fn stats(&self) -> Box<dyn Stats>;
    fn start_recording(&mut self);
    fn stop_recording(&mut self);
    fn process(
        &mut self,
        input_id: PoolStorageIndex,
        cplx: f64
    ) -> Vec<CorpusDelta>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn get_random_index(&mut self) -> Option<PoolStorageIndex>; }
Expand description

An object safe trait that combines the methods of the Sensor, Pool, and CompatibleWithObservations traits.

While it’s often useful to work with the Sensor and Pool traits separately, the fuzzer doesn’t actually need to know about the sensor and pool individually. By having this SensorAndPool trait, we can give the fuzzer a Box<dyn SensorAndPool> and get rid of two generic type parameters: S: Sensor and P: Pool + CompatibleWithObservations<S::Observations>.

This is better for compile times and simplifies the implementation of the fuzzer. Users of fuzzcheck should feel free to ignore this trait, as it is arguably more an implementation detail than a fundamental building block of the fuzzer.

Currently, there are two types implementing SensorAndPool:

  1. (S, P) where S: Sensor and P: Pool + CompatibleWithObservations<S::Observations>
  2. AndSensorAndPool

Required Methods

Implementations on Foreign Types

Implementors