Struct libafl::feedbacks::map::MapFeedback
source · pub struct MapFeedback<N, O, R, S, T> { /* private fields */ }
Expand description
The most common AFL-like feedback type
Implementations§
source§impl<N, O, R, S, T> MapFeedback<N, O, R, S, T>where
T: PartialEq + Default + Copy + 'static + Serialize + DeserializeOwned + Debug,
R: Reducer<T>,
for<'it> O: MapObserver<Entry = T> + AsIter<'it, Item = T>,
N: IsNovel<T>,
S: UsesInput + HasNamedMetadata + HasClientPerfMonitor + Debug,
impl<N, O, R, S, T> MapFeedback<N, O, R, S, T>where
T: PartialEq + Default + Copy + 'static + Serialize + DeserializeOwned + Debug,
R: Reducer<T>,
for<'it> O: MapObserver<Entry = T> + AsIter<'it, Item = T>,
N: IsNovel<T>,
S: UsesInput + HasNamedMetadata + HasClientPerfMonitor + Debug,
sourcepub fn new_tracking(
map_observer: &O,
track_indexes: bool,
track_novelties: bool
) -> Self
pub fn new_tracking(
map_observer: &O,
track_indexes: bool,
track_novelties: bool
) -> Self
Create new MapFeedback
specifying if it must track indexes of used entries and/or novelties
sourcepub fn with_names(name: &'static str, observer_name: &'static str) -> Self
pub fn with_names(name: &'static str, observer_name: &'static str) -> Self
Create new MapFeedback
Trait Implementations§
source§impl<N: Clone, O: Clone, R: Clone, S: Clone, T: Clone> Clone for MapFeedback<N, O, R, S, T>
impl<N: Clone, O: Clone, R: Clone, S: Clone, T: Clone> Clone for MapFeedback<N, O, R, S, T>
source§fn clone(&self) -> MapFeedback<N, O, R, S, T>
fn clone(&self) -> MapFeedback<N, O, R, S, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<O, S> Feedback<S> for MapFeedback<DifferentIsNovel, O, MaxReducer, S, u8>where
for<'it> O: MapObserver<Entry = u8> + AsSlice<Entry = u8> + AsIter<'it, Item = u8>,
S: UsesInput + HasNamedMetadata + HasClientPerfMonitor + Debug,
impl<O, S> Feedback<S> for MapFeedback<DifferentIsNovel, O, MaxReducer, S, u8>where
for<'it> O: MapObserver<Entry = u8> + AsSlice<Entry = u8> + AsIter<'it, Item = u8>,
S: UsesInput + HasNamedMetadata + HasClientPerfMonitor + Debug,
Specialize for the common coverage map size, maximization of u8s
source§fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
_input: &<S as UsesInput>::Input,
observers: &OT,
_exit_kind: &ExitKind
) -> Result<bool, Error>where
EM: EventFirer<State = S>,
OT: ObserversTuple<S>,
fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
_input: &<S as UsesInput>::Input,
observers: &OT,
_exit_kind: &ExitKind
) -> Result<bool, Error>where
EM: EventFirer<State = S>,
OT: ObserversTuple<S>,
is_interesting
return if an input is worth the addition to the corpussource§fn init_state(&mut self, _state: &mut S) -> Result<(), Error>
fn init_state(&mut self, _state: &mut S) -> Result<(), Error>
Initializes the feedback state.
This method is called after that the
State
is created.source§impl<N, O, R, S, T> Feedback<S> for MapFeedback<N, O, R, S, T>where
N: IsNovel<T> + Debug,
O: MapObserver<Entry = T> + for<'it> AsIter<'it, Item = T> + Debug,
R: Reducer<T> + Debug,
S: UsesInput + HasClientPerfMonitor + HasNamedMetadata + Debug,
T: Default + Copy + Serialize + for<'de> Deserialize<'de> + PartialEq + Debug + 'static,
impl<N, O, R, S, T> Feedback<S> for MapFeedback<N, O, R, S, T>where
N: IsNovel<T> + Debug,
O: MapObserver<Entry = T> + for<'it> AsIter<'it, Item = T> + Debug,
R: Reducer<T> + Debug,
S: UsesInput + HasClientPerfMonitor + HasNamedMetadata + Debug,
T: Default + Copy + Serialize + for<'de> Deserialize<'de> + PartialEq + Debug + 'static,
source§fn discard_metadata(
&mut self,
_state: &mut S,
_input: &<S as UsesInput>::Input
) -> Result<(), Error>
fn discard_metadata(
&mut self,
_state: &mut S,
_input: &<S as UsesInput>::Input
) -> Result<(), Error>
Discard the stored metadata in case that the testcase is not added to the corpus
source§fn init_state(&mut self, state: &mut S) -> Result<(), Error>
fn init_state(&mut self, state: &mut S) -> Result<(), Error>
Initializes the feedback state.
This method is called after that the
State
is created.source§default fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
input: &<S as UsesInput>::Input,
observers: &OT,
exit_kind: &ExitKind
) -> Result<bool, Error>where
EM: EventFirer<State = S>,
OT: ObserversTuple<S>,
default fn is_interesting<EM, OT>(
&mut self,
state: &mut S,
manager: &mut EM,
input: &<S as UsesInput>::Input,
observers: &OT,
exit_kind: &ExitKind
) -> Result<bool, Error>where
EM: EventFirer<State = S>,
OT: ObserversTuple<S>,
is_interesting
return if an input is worth the addition to the corpussource§impl<N, O, R, S, T> HasObserverName for MapFeedback<N, O, R, S, T>where
T: PartialEq + Default + Copy + 'static + Serialize + DeserializeOwned + Debug,
R: Reducer<T>,
N: IsNovel<T>,
for<'it> O: MapObserver<Entry = T> + AsIter<'it, Item = T>,
S: HasNamedMetadata,
impl<N, O, R, S, T> HasObserverName for MapFeedback<N, O, R, S, T>where
T: PartialEq + Default + Copy + 'static + Serialize + DeserializeOwned + Debug,
R: Reducer<T>,
N: IsNovel<T>,
for<'it> O: MapObserver<Entry = T> + AsIter<'it, Item = T>,
S: HasNamedMetadata,
source§fn observer_name(&self) -> &str
fn observer_name(&self) -> &str
The name associated with the observer
Auto Trait Implementations§
impl<N, O, R, S, T> RefUnwindSafe for MapFeedback<N, O, R, S, T>where
N: RefUnwindSafe,
O: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<N, O, R, S, T> Send for MapFeedback<N, O, R, S, T>where
N: Send,
O: Send,
R: Send,
S: Send,
T: Send,
impl<N, O, R, S, T> Sync for MapFeedback<N, O, R, S, T>where
N: Sync,
O: Sync,
R: Sync,
S: Sync,
T: Sync,
impl<N, O, R, S, T> Unpin for MapFeedback<N, O, R, S, T>where
N: Unpin,
O: Unpin,
R: Unpin,
S: Unpin,
T: Unpin,
impl<N, O, R, S, T> UnwindSafe for MapFeedback<N, O, R, S, T>where
N: UnwindSafe,
O: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting
TupleList
, of an Prepend::prepend()
call,
including the prepended entry.source§fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.