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§
sourcefn metadata_map(&self) -> &SerdeAnyMap
fn metadata_map(&self) -> &SerdeAnyMap
A map, storing all metadata
sourcefn metadata_map_mut(&mut self) -> &mut SerdeAnyMap
fn metadata_map_mut(&mut self) -> &mut SerdeAnyMap
A map, storing all metadata (mutable)
Provided Methods§
sourcefn add_metadata<M>(&mut self, meta: M)where
M: SerdeAny,
fn add_metadata<M>(&mut self, meta: M)where M: SerdeAny,
Add a metadata to the metadata map
sourcefn has_metadata<M>(&self) -> boolwhere
M: SerdeAny,
fn has_metadata<M>(&self) -> boolwhere M: SerdeAny,
Check for a metadata