Trait MutatorsTuple

Source
pub trait MutatorsTuple<I, S>: HasLen {
    // Required methods
    fn mutate_all(
        &mut self,
        state: &mut S,
        input: &mut I,
    ) -> Result<MutationResult, Error>;
    fn post_exec_all(
        &mut self,
        state: &mut S,
        new_corpus_id: Option<CorpusId>,
    ) -> Result<(), Error>;
    fn get_and_mutate(
        &mut self,
        index: MutationId,
        state: &mut S,
        input: &mut I,
    ) -> Result<MutationResult, Error>;
    fn get_and_post_exec(
        &mut self,
        index: usize,
        state: &mut S,
        corpus_id: Option<CorpusId>,
    ) -> Result<(), Error>;
}
Expand description

A Tuple of Mutators that can execute multiple Mutators in a row.

Required Methods§

Source

fn mutate_all( &mut self, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Runs the Mutator::mutate function on all Mutators in this Tuple.

Source

fn post_exec_all( &mut self, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Runs the Mutator::post_exec function on all Mutators in this Tuple. new_corpus_id will be Some if a new Testcase was created this execution.

Source

fn get_and_mutate( &mut self, index: MutationId, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Gets the Mutator at the given index and runs the mutate function on it.

Source

fn get_and_post_exec( &mut self, index: usize, state: &mut S, corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Gets the Mutator at the given index and runs the post_exec function on it. new_corpus_id will be Some if a new Testcase was created this execution.

Implementations on Foreign Types§

Source§

impl<Head, Tail, I, S> MutatorsTuple<I, S> for (Head, Tail)
where Head: Mutator<I, S>, Tail: MutatorsTuple<I, S>,

Source§

fn mutate_all( &mut self, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn post_exec_all( &mut self, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

fn get_and_mutate( &mut self, index: MutationId, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn get_and_post_exec( &mut self, index: usize, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

impl<I, S> MutatorsTuple<I, S> for ()

Source§

fn mutate_all( &mut self, _state: &mut S, _input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn post_exec_all( &mut self, _state: &mut S, _new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

fn get_and_mutate( &mut self, _index: MutationId, _state: &mut S, _input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn get_and_post_exec( &mut self, _index: usize, _state: &mut S, _new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

impl<I, S> MutatorsTuple<I, S> for Vec<Box<dyn Mutator<I, S>>>

Source§

fn mutate_all( &mut self, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn post_exec_all( &mut self, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

fn get_and_mutate( &mut self, index: MutationId, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn get_and_post_exec( &mut self, index: usize, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

impl<Tail, I, S> MutatorsTuple<I, S> for (Tail,)
where Tail: MutatorsTuple<I, S>,

Source§

fn mutate_all( &mut self, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn post_exec_all( &mut self, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Source§

fn get_and_mutate( &mut self, index: MutationId, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>

Source§

fn get_and_post_exec( &mut self, index: usize, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>

Implementors§