Trait libafl::observers::map::MapObserver[][src]

pub trait MapObserver<T>: Observer 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 map(&self) -> &[T][src]

Get the map

fn map_mut(&mut self) -> &mut [T][src]

Get the map (mutable)

fn initial(&self) -> T[src]

Get the initial value for reset()

fn initial_mut(&mut self) -> &mut T[src]

Get the initial value for reset()

fn set_initial(&mut self, initial: T)[src]

Set the initial value for reset()

Provided methods

fn usable_count(&self) -> usize[src]

Get the number of usable entries in the map (all by default)

fn reset_map(&mut self) -> Result<(), Error>[src]

Reset the map

Implementors

impl<'a, T> MapObserver<T> for StdMapObserver<'a, T> where
    T: Default + Copy + 'static + Serialize + DeserializeOwned
[src]

fn map(&self) -> &[T][src]

fn map_mut(&mut self) -> &mut [T][src]

fn initial(&self) -> T[src]

fn initial_mut(&mut self) -> &mut T[src]

fn set_initial(&mut self, initial: T)[src]

impl<'a, T> MapObserver<T> for VariableMapObserver<'a, T> where
    T: Default + Copy + 'static + Serialize + DeserializeOwned
[src]

fn map(&self) -> &[T][src]

fn map_mut(&mut self) -> &mut [T][src]

fn usable_count(&self) -> usize[src]

fn initial(&self) -> T[src]

fn initial_mut(&mut self) -> &mut T[src]

fn set_initial(&mut self, initial: T)[src]

impl<M> MapObserver<u8> for HitcountsMapObserver<M> where
    M: MapObserver<u8>, 
[src]

fn map(&self) -> &[u8][src]

fn map_mut(&mut self) -> &mut [u8][src]

fn usable_count(&self) -> usize[src]

fn initial(&self) -> u8[src]

fn initial_mut(&mut self) -> &mut u8[src]

fn set_initial(&mut self, initial: u8)[src]