Trait libafl::schedulers::Scheduler

source ·
pub trait Scheduler: UsesState
where Self::State: HasCorpus,
{ // Required methods fn on_add( &mut self, _state: &mut Self::State, _idx: CorpusId ) -> Result<(), Error>; fn next(&mut self, state: &mut Self::State) -> Result<CorpusId, Error>; // Provided methods fn on_evaluation<OT>( &mut self, _state: &mut Self::State, _input: &<Self::State as UsesInput>::Input, _observers: &OT ) -> Result<(), Error> where OT: ObserversTuple<Self::State> { ... } fn set_current_scheduled( &mut self, state: &mut Self::State, next_idx: Option<CorpusId> ) -> Result<(), Error> { ... } }
Expand description

The scheduler define how the fuzzer requests a testcase from the corpus. It has hooks to corpus add/replace/remove to allow complex scheduling algorithms to collect data.

Required Methods§

source

fn on_add( &mut self, _state: &mut Self::State, _idx: CorpusId ) -> Result<(), Error>

Called when a Testcase is added to the corpus

source

fn next(&mut self, state: &mut Self::State) -> Result<CorpusId, Error>

Gets the next entry

Provided Methods§

source

fn on_evaluation<OT>( &mut self, _state: &mut Self::State, _input: &<Self::State as UsesInput>::Input, _observers: &OT ) -> Result<(), Error>
where OT: ObserversTuple<Self::State>,

An input has been evaluated

source

fn set_current_scheduled( &mut self, state: &mut Self::State, next_idx: Option<CorpusId> ) -> Result<(), Error>

Set current fuzzed corpus id and scheduled_count

Object Safety§

This trait is not object safe.

Implementors§