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 Mutator
s
that can execute multiple Mutators
in a row.
Required Methods§
Sourcefn mutate_all(
&mut self,
state: &mut S,
input: &mut I,
) -> Result<MutationResult, Error>
fn mutate_all( &mut self, state: &mut S, input: &mut I, ) -> Result<MutationResult, Error>
Runs the Mutator::mutate
function on all Mutator
s
in this Tuple
.
Sourcefn post_exec_all(
&mut self,
state: &mut S,
new_corpus_id: Option<CorpusId>,
) -> Result<(), Error>
fn post_exec_all( &mut self, state: &mut S, new_corpus_id: Option<CorpusId>, ) -> Result<(), Error>
Runs the Mutator::post_exec
function on all Mutator
s
in this Tuple
.
new_corpus_id
will be Some
if a new Testcase
was created this execution.
Sourcefn get_and_mutate(
&mut self,
index: MutationId,
state: &mut S,
input: &mut I,
) -> Result<MutationResult, Error>
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.