Trait libafl::observers::map::MapObserver [−][src]
pub trait MapObserver<T>: HasLen + Named + Serialize + DeserializeOwned where
T: PrimInt + Default + Copy + Debug, {
fn map(&self) -> Option<&[T]>;
fn map_mut(&mut self) -> Option<&mut [T]>;
fn initial(&self) -> T;
fn initial_mut(&mut self) -> &mut T;
fn set_initial(&mut self, initial: T);
fn get(&self, idx: usize) -> &T { ... }
fn get_mut(&mut self, idx: usize) -> &mut T { ... }
fn usable_count(&self) -> usize { ... }
fn count_bytes(&self) -> u64 { ... }
fn hash(&self) -> u64 { ... }
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
Get the map (mutable) if the observer can be represented with a slice
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)
fn count_bytes(&self) -> u64
fn count_bytes(&self) -> u64
Count the set bytes in the map