pub trait Evaluator<E, EM>: UsesStatewhere
E: UsesState<State = Self::State>,
EM: UsesState<State = Self::State>,{
fn evaluate_input_events(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input,
send_events: bool
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>;
fn add_input(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input
) -> Result<CorpusId, Error>;
fn evaluate_input(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error> { ... }
}
Expand description
Evaluate an input modifying the state of the fuzzer
Required Methods§
sourcefn evaluate_input_events(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input,
send_events: bool
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
fn evaluate_input_events(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input,
send_events: bool
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
Runs the input and triggers observers and feedback, returns if is interesting an (option) the index of the new testcase in the corpus This version has a boolean to decide if send events to the manager.
sourcefn add_input(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input
) -> Result<CorpusId, Error>
fn add_input(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input
) -> Result<CorpusId, Error>
Runs the input and triggers observers and feedback.
Adds an input, to the corpus even if it’s not considered interesting
by the feedback
.
Returns the index
of the new testcase in the corpus.
Usually, you want to use Evaluator::evaluate_input
, unless you know what you are doing.
Provided Methods§
sourcefn evaluate_input(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
fn evaluate_input(
&mut self,
state: &mut Self::State,
executor: &mut E,
manager: &mut EM,
input: <Self::State as UsesInput>::Input
) -> Result<(ExecuteInputResult, Option<CorpusId>), Error>
Runs the input and triggers observers and feedback,
returns if is interesting an (option) the index of the new crate::corpus::Testcase
in the corpus