Trait libafl::state::HasMetadata

source ·
pub trait HasMetadata {
    // Required methods
    fn metadata_map(&self) -> &SerdeAnyMap;
    fn metadata_map_mut(&mut self) -> &mut SerdeAnyMap;

    // Provided methods
    fn add_metadata<M>(&mut self, meta: M)
       where M: SerdeAny { ... }
    fn has_metadata<M>(&self) -> bool
       where M: SerdeAny { ... }
    fn metadata<M>(&self) -> Result<&M, Error>
       where M: SerdeAny { ... }
    fn metadata_mut<M>(&mut self) -> Result<&mut M, Error>
       where M: SerdeAny { ... }
}
Expand description

Trait for elements offering metadata

Required Methods§

source

fn metadata_map(&self) -> &SerdeAnyMap

A map, storing all metadata

source

fn metadata_map_mut(&mut self) -> &mut SerdeAnyMap

A map, storing all metadata (mutable)

Provided Methods§

source

fn add_metadata<M>(&mut self, meta: M)where M: SerdeAny,

Add a metadata to the metadata map

source

fn has_metadata<M>(&self) -> boolwhere M: SerdeAny,

Check for a metadata

source

fn metadata<M>(&self) -> Result<&M, Error>where M: SerdeAny,

To get metadata

source

fn metadata_mut<M>(&mut self) -> Result<&mut M, Error>where M: SerdeAny,

To get mutable metadata

Implementors§

source§

impl<I> HasMetadata for Testcase<I>where I: Input,

source§

impl<I, C, R, SC> HasMetadata for StdState<I, C, R, SC>