Trait libafl::mutators::MutatorsTuple
source · [−]pub trait MutatorsTuple<I, S>: HasConstLenwhere
I: Input,{
fn mutate_all(
&mut self,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>;
fn post_exec_all(
&mut self,
state: &mut S,
stage_idx: i32,
corpus_idx: Option<usize>
) -> Result<(), Error>;
fn get_and_mutate(
&mut self,
index: usize,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>;
fn get_and_post_exec(
&mut self,
index: usize,
state: &mut S,
stage_idx: i32,
corpus_idx: Option<usize>
) -> Result<(), Error>;
}
Expand description
A Tuple
of Mutators
that can execute multiple Mutators
in a row.
Required Methods
sourcefn mutate_all(
&mut self,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>
fn mutate_all(
&mut self,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>
Runs the mutate
function on all Mutators
in this Tuple
.
sourcefn post_exec_all(
&mut self,
state: &mut S,
stage_idx: i32,
corpus_idx: Option<usize>
) -> Result<(), Error>
fn post_exec_all(
&mut self,
state: &mut S,
stage_idx: i32,
corpus_idx: Option<usize>
) -> Result<(), Error>
Runs the post_exec
function on all Mutators
in this Tuple
.
sourcefn get_and_mutate(
&mut self,
index: usize,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>
fn get_and_mutate(
&mut self,
index: usize,
state: &mut S,
input: &mut I,
stage_idx: i32
) -> Result<MutationResult, Error>
Gets the Mutator
at the given index and runs the mutate
function on it.