Struct libafl_bolts::serdeany::serdeany_registry::SerdeAnyMap
source · pub struct SerdeAnyMap { /* private fields */ }
Expand description
A (de)serializable anymap containing (de)serializable trait objects registered in the registry
Implementations§
source§impl SerdeAnyMap
impl SerdeAnyMap
sourcepub fn get_mut<T>(&mut self) -> Option<&mut T>where
T: SerdeAny,
pub fn get_mut<T>(&mut self) -> Option<&mut T>where
T: SerdeAny,
Get a mutable borrow for an element in the map.
sourcepub fn remove<T>(&mut self) -> Option<Box<T>>where
T: SerdeAny,
pub fn remove<T>(&mut self) -> Option<Box<T>>where
T: SerdeAny,
Remove an element in the map. Returns the removed element.
sourcepub fn insert_boxed<T>(&mut self, value: Box<T>)where
T: SerdeAny,
pub fn insert_boxed<T>(&mut self, value: Box<T>)where
T: SerdeAny,
Insert a boxed element into the map.
sourcepub fn raw_entry_mut<T>(
&mut self
) -> RawEntryMut<'_, TypeRepr, Box<dyn SerdeAny + 'static>, BuildHasherDefault<AHasher>>where
T: SerdeAny,
pub fn raw_entry_mut<T>(
&mut self
) -> RawEntryMut<'_, TypeRepr, Box<dyn SerdeAny + 'static>, BuildHasherDefault<AHasher>>where
T: SerdeAny,
Get an entry to an element in this map.
sourcepub fn get_or_insert_with<T>(&mut self, default: impl FnOnce() -> T) -> &mut Twhere
T: SerdeAny,
pub fn get_or_insert_with<T>(&mut self, default: impl FnOnce() -> T) -> &mut Twhere
T: SerdeAny,
Gets a value by type, or inserts it using the given construction function default
sourcepub fn get_or_insert_with_boxed<T>(
&mut self,
default: impl FnOnce() -> Box<T>
) -> &mut Twhere
T: SerdeAny + 'static,
pub fn get_or_insert_with_boxed<T>(
&mut self,
default: impl FnOnce() -> Box<T>
) -> &mut Twhere
T: SerdeAny + 'static,
Gets a value by type, or inserts it using the given construction function default
(returning a boxed value)
sourcepub fn contains<T>(&self) -> boolwhere
T: SerdeAny,
pub fn contains<T>(&self) -> boolwhere
T: SerdeAny,
Returns if the map contains the given type.
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new SerdeAnyMap
.
Trait Implementations§
source§impl Clone for SerdeAnyMap
impl Clone for SerdeAnyMap
source§impl Debug for SerdeAnyMap
impl Debug for SerdeAnyMap
source§impl Default for SerdeAnyMap
impl Default for SerdeAnyMap
source§impl<'de> Deserialize<'de> for SerdeAnyMap
impl<'de> Deserialize<'de> for SerdeAnyMap
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SerdeAnyMap
impl !RefUnwindSafe for SerdeAnyMap
impl !Send for SerdeAnyMap
impl !Sync for SerdeAnyMap
impl Unpin for SerdeAnyMap
impl !UnwindSafe for SerdeAnyMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting
TupleList
, of an Prepend::prepend()
call,
including the prepended entry.source§fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.