Trait libafl::observers::map::MapObserver [−][src]
pub trait MapObserver<T>: Named + Serialize + DeserializeOwned where
T: Default + Copy, { fn map(&self) -> &[T]; fn map_mut(&mut self) -> &mut [T]; fn initial(&self) -> T; fn initial_mut(&mut self) -> &mut T; fn set_initial(&mut self, initial: T); fn usable_count(&self) -> usize { ... } fn reset_map(&mut self) -> Result<(), Error> { ... } }
Expand description
A MapObserver
observes the static map, as oftentimes used for afl-like coverage information
Required methods
fn initial_mut(&mut self) -> &mut T
fn initial_mut(&mut self) -> &mut T
Get the initial value for reset()
fn set_initial(&mut self, initial: T)
fn set_initial(&mut self, initial: T)
Set the initial value for reset()
Provided methods
fn usable_count(&self) -> usize
fn usable_count(&self) -> usize
Get the number of usable entries in the map (all by default)
Implementors
impl<'a, T> MapObserver<T> for StdMapObserver<'a, T> where
T: Default + Copy + 'static + Serialize + DeserializeOwned,
impl<'a, T> MapObserver<T> for VariableMapObserver<'a, T> where
T: Default + Copy + 'static + Serialize + DeserializeOwned,
impl<'a, T, const N: usize> MapObserver<T> for ConstMapObserver<'a, T, N> where
T: Default + Copy + 'static + Serialize + DeserializeOwned,