Struct libafl::bolts::staterestore::StateRestorer [−][src]
pub struct StateRestorer<SP> where
SP: ShMemProvider, { /* fields omitted */ }
Expand description
A StateRestorer
saves and restores bytes to a shared map.
If the state gets larger than the preallocated ShMem
shared map,
it will instead write to disk, and store the file name into the map.
Writing to StateRestorer
multiple times is not allowed.
Implementations
Get the map size backing this StateRestorer
.
Writes this StateRestorer
to env variable, to be restored later
Create a StateRestorer
from env
variable name
Create a new StateRestorer
.
Saves a state to the connected ShMem
, or a tmpfile, if its serialized size get too large.
Reset this StateRestorer
to an empty state.
Returns true, if this StateRestorer
has contents.
Restores the contents saved in this StateRestorer
, if any are availiable.
Can only be read once.
Trait Implementations
Auto Trait Implementations
impl<SP> RefUnwindSafe for StateRestorer<SP> where
SP: RefUnwindSafe,
<SP as ShMemProvider>::Mem: RefUnwindSafe,
impl<SP> !Send for StateRestorer<SP>
impl<SP> !Sync for StateRestorer<SP>
impl<SP> Unpin for StateRestorer<SP> where
<SP as ShMemProvider>::Mem: Unpin,
impl<SP> UnwindSafe for StateRestorer<SP> where
SP: RefUnwindSafe,
<SP as ShMemProvider>::Mem: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more
type Output = T
type Output = T
Should always be Self