Trait libafl::corpus::CorpusScheduler [−][src]
pub trait CorpusScheduler<I, S> where
I: Input, { fn next(&self, state: &mut S) -> Result<usize, Error>; fn on_add(&self, _state: &mut S, _idx: usize) -> Result<(), Error> { ... } fn on_replace(
&self,
_state: &mut S,
_idx: usize,
_testcase: &Testcase<I>
) -> Result<(), Error> { ... } fn on_remove(
&self,
_state: &mut S,
_idx: usize,
_testcase: &Option<Testcase<I>>
) -> Result<(), Error> { ... } }
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
Loading content...Provided methods
fn on_add(&self, _state: &mut S, _idx: usize) -> Result<(), Error>
[src]
Add an entry to the corpus and return its index
fn on_replace(
&self,
_state: &mut S,
_idx: usize,
_testcase: &Testcase<I>
) -> Result<(), Error>
[src]
&self,
_state: &mut S,
_idx: usize,
_testcase: &Testcase<I>
) -> Result<(), Error>
Replaces the testcase at the given idx
fn on_remove(
&self,
_state: &mut S,
_idx: usize,
_testcase: &Option<Testcase<I>>
) -> Result<(), Error>
[src]
&self,
_state: &mut S,
_idx: usize,
_testcase: &Option<Testcase<I>>
) -> Result<(), Error>
Removes an entry from the corpus, returning it if it was present.
Implementors
impl<C, CS, F, I, M, R, S> CorpusScheduler<I, S> for MinimizerCorpusScheduler<C, CS, F, I, M, R, S> where
CS: CorpusScheduler<I, S>,
F: FavFactor<I>,
I: Input,
M: AsSlice<usize> + SerdeAny,
S: HasCorpus<C, I> + HasMetadata + HasRand<R>,
C: Corpus<I>,
R: Rand,
[src]
impl<C, CS, F, I, M, R, S> CorpusScheduler<I, S> for MinimizerCorpusScheduler<C, CS, F, I, M, R, S> where
CS: CorpusScheduler<I, S>,
F: FavFactor<I>,
I: Input,
M: AsSlice<usize> + SerdeAny,
S: HasCorpus<C, I> + HasMetadata + HasRand<R>,
C: Corpus<I>,
R: Rand,
[src]fn on_add(&self, state: &mut S, idx: usize) -> Result<(), Error>
[src]
fn on_add(&self, state: &mut S, idx: usize) -> Result<(), Error>
[src]Add an entry to the corpus and return its index
fn on_replace(
&self,
state: &mut S,
idx: usize,
testcase: &Testcase<I>
) -> Result<(), Error>
[src]
fn on_replace(
&self,
state: &mut S,
idx: usize,
testcase: &Testcase<I>
) -> Result<(), Error>
[src]Replaces the testcase at the given idx
impl<C, I, R, S> CorpusScheduler<I, S> for RandCorpusScheduler<C, I, R, S> where
S: HasCorpus<C, I> + HasRand<R>,
C: Corpus<I>,
I: Input,
R: Rand,
[src]
impl<C, I, R, S> CorpusScheduler<I, S> for RandCorpusScheduler<C, I, R, S> where
S: HasCorpus<C, I> + HasRand<R>,
C: Corpus<I>,
I: Input,
R: Rand,
[src]