pub trait Feedback<EM, I, OT, S>: StateInitializer<S> + Named {
// Required method
fn last_result(&self) -> Result<bool, Error>;
// Provided methods
fn is_interesting(
&mut self,
_state: &mut S,
_manager: &mut EM,
_input: &I,
_observers: &OT,
_exit_kind: &ExitKind,
) -> Result<bool, Error> { ... }
fn is_interesting_introspection(
&mut self,
state: &mut S,
manager: &mut EM,
input: &I,
observers: &OT,
exit_kind: &ExitKind,
) -> Result<bool, Error>
where S: HasClientPerfMonitor { ... }
fn append_hit_feedbacks(
&self,
list: &mut Vec<Cow<'static, str>>,
) -> Result<(), Error> { ... }
fn append_metadata(
&mut self,
_state: &mut S,
_manager: &mut EM,
_observers: &OT,
_testcase: &mut Testcase<I>,
) -> Result<(), Error> { ... }
}
Expand description
Feedbacks evaluate the observers. Basically, they reduce the information provided by an observer to a value, indicating the “interestingness” of the last run.
Required Methods§
Sourcefn last_result(&self) -> Result<bool, Error>
fn last_result(&self) -> Result<bool, Error>
CUT MY LIFE INTO PIECES; THIS IS MY LAST Feedback::is_interesting
run
Provided Methods§
Sourcefn is_interesting(
&mut self,
_state: &mut S,
_manager: &mut EM,
_input: &I,
_observers: &OT,
_exit_kind: &ExitKind,
) -> Result<bool, Error>
fn is_interesting( &mut self, _state: &mut S, _manager: &mut EM, _input: &I, _observers: &OT, _exit_kind: &ExitKind, ) -> Result<bool, Error>
is_interesting
return if an input is worth the addition to the corpus
Sourcefn is_interesting_introspection(
&mut self,
state: &mut S,
manager: &mut EM,
input: &I,
observers: &OT,
exit_kind: &ExitKind,
) -> Result<bool, Error>where
S: HasClientPerfMonitor,
fn is_interesting_introspection(
&mut self,
state: &mut S,
manager: &mut EM,
input: &I,
observers: &OT,
exit_kind: &ExitKind,
) -> Result<bool, Error>where
S: HasClientPerfMonitor,
Returns if the result of a run is interesting and the value input should be stored in a corpus. It also keeps track of introspection stats.
Sourcefn append_hit_feedbacks(
&self,
list: &mut Vec<Cow<'static, str>>,
) -> Result<(), Error>
fn append_hit_feedbacks( &self, list: &mut Vec<Cow<'static, str>>, ) -> Result<(), Error>
Append this Feedback
’s name if Feedback::last_result
is true
If you have any nested Feedbacks, you must call this function on them if relevant.
See the implementations of CombinedFeedback