pub struct StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>, { /* private fields */ }
Expand description
The state a fuzz run.
Implementations
sourceimpl<C, I, R, SC> StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcepub fn load_from_directory<E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
manager: &mut EM,
in_dir: &Path,
forced: bool,
loader: &mut dyn FnMut(&mut Z, &mut Self, &Path) -> Result<I, Error>
) -> Result<(), Error> where
Z: Evaluator<E, EM, I, Self>,
pub fn load_from_directory<E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
manager: &mut EM,
in_dir: &Path,
forced: bool,
loader: &mut dyn FnMut(&mut Z, &mut Self, &Path) -> Result<I, Error>
) -> Result<(), Error> where
Z: Evaluator<E, EM, I, Self>,
Loads inputs from a directory.
If forced
is true
, the value will be loaded,
even if it’s not considered to be interesting
.
sourcepub fn load_initial_inputs_forced<E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
manager: &mut EM,
in_dirs: &[PathBuf]
) -> Result<(), Error> where
Z: Evaluator<E, EM, I, Self>,
EM: EventFirer<I>,
pub fn load_initial_inputs_forced<E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
manager: &mut EM,
in_dirs: &[PathBuf]
) -> Result<(), Error> where
Z: Evaluator<E, EM, I, Self>,
EM: EventFirer<I>,
Loads all intial inputs, even if they are not considered interesting
.
This is rarely the right method, use load_initial_inputs
,
and potentially fix your Feedback
, instead.
sourceimpl<C, I, R, SC> StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcepub fn generate_initial_inputs_forced<G, E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
generator: &mut G,
manager: &mut EM,
num: usize
) -> Result<(), Error> where
G: Generator<I, Self>,
Z: Evaluator<E, EM, I, Self>,
EM: EventFirer<I>,
pub fn generate_initial_inputs_forced<G, E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
generator: &mut G,
manager: &mut EM,
num: usize
) -> Result<(), Error> where
G: Generator<I, Self>,
Z: Evaluator<E, EM, I, Self>,
EM: EventFirer<I>,
Generate num
initial inputs, using the passed-in generator and force the addition to corpus.
sourcepub fn generate_initial_inputs<G, E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
generator: &mut G,
manager: &mut EM,
num: usize
) -> Result<(), Error> where
G: Generator<I, Self>,
Z: Evaluator<E, EM, I, Self>,
EM: EventFirer<I>,
pub fn generate_initial_inputs<G, E, EM, Z>(
&mut self,
fuzzer: &mut Z,
executor: &mut E,
generator: &mut G,
manager: &mut EM,
num: usize
) -> Result<(), Error> where
G: Generator<I, Self>,
Z: Evaluator<E, EM, I, Self>,
EM: EventFirer<I>,
Generate num
initial inputs, using the passed-in generator.
Trait Implementations
sourceimpl<C: Clone, I: Clone, R: Clone, SC: Clone> Clone for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C: Clone, I: Clone, R: Clone, SC: Clone> Clone for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourceimpl<C: Debug, I: Debug, R: Debug, SC: Debug> Debug for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C: Debug, I: Debug, R: Debug, SC: Debug> Debug for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourceimpl<'de, C, I, R, SC> Deserialize<'de> for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
C: Serialize + for<'a> Deserialize<'a>,
impl<'de, C, I, R, SC> Deserialize<'de> for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
C: Serialize + for<'a> Deserialize<'a>,
sourcefn 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
sourceimpl<C, I, R, SC> HasClientPerfMonitor for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasClientPerfMonitor for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcefn stability_mut(&mut self) -> &mut Option<f32>
fn stability_mut(&mut self) -> &mut Option<f32>
This node’s stability (mutable)
sourcefn introspection_monitor(&self) -> &ClientPerfMonitor
fn introspection_monitor(&self) -> &ClientPerfMonitor
ClientPerfMonitor
itself
sourcefn introspection_monitor_mut(&mut self) -> &mut ClientPerfMonitor
fn introspection_monitor_mut(&mut self) -> &mut ClientPerfMonitor
Mutatable ref to ClientPerfMonitor
sourceimpl<C, I, R, SC> HasCorpus<I> for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasCorpus<I> for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourceimpl<C, I, R, SC> HasExecutions for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasExecutions for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcefn executions(&self) -> &usize
fn executions(&self) -> &usize
The executions counter
sourcefn executions_mut(&mut self) -> &mut usize
fn executions_mut(&mut self) -> &mut usize
The executions counter (mutable)
sourceimpl<C, I, R, SC> HasMaxSize for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasMaxSize for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourceimpl<C, I, R, SC> HasMetadata for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasMetadata for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcefn metadata(&self) -> &SerdeAnyMap
fn metadata(&self) -> &SerdeAnyMap
Get all the metadata into an hashbrown::HashMap
sourcefn metadata_mut(&mut self) -> &mut SerdeAnyMap
fn metadata_mut(&mut self) -> &mut SerdeAnyMap
Get all the metadata into an hashbrown::HashMap
(mutable)
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) -> bool where
M: SerdeAny,
fn has_metadata<M>(&self) -> bool where
M: SerdeAny,
Check for a metadata
sourceimpl<C, I, R, SC> HasNamedMetadata for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasNamedMetadata for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcefn named_metadata(&self) -> &NamedSerdeAnyMap
fn named_metadata(&self) -> &NamedSerdeAnyMap
Get all the metadata into an hashbrown::HashMap
sourcefn named_metadata_mut(&mut self) -> &mut NamedSerdeAnyMap
fn named_metadata_mut(&mut self) -> &mut NamedSerdeAnyMap
Get all the metadata into an hashbrown::HashMap
(mutable)
sourcefn add_named_metadata<M>(&mut self, meta: M, name: &str) where
M: SerdeAny,
fn add_named_metadata<M>(&mut self, meta: M, name: &str) where
M: SerdeAny,
Add a metadata to the metadata map
sourcefn has_named_metadata<M>(&self, name: &str) -> bool where
M: SerdeAny,
fn has_named_metadata<M>(&self, name: &str) -> bool where
M: SerdeAny,
Check for a metadata
sourceimpl<C, I, R, SC> HasRand for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasRand for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourceimpl<C, I, R, SC> HasSolutions<I> for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasSolutions<I> for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourceimpl<C, I, R, SC> HasStartTime for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
impl<C, I, R, SC> HasStartTime for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
sourcefn start_time(&self) -> &Duration
fn start_time(&self) -> &Duration
The starting time
sourcefn start_time_mut(&mut self) -> &mut Duration
fn start_time_mut(&mut self) -> &mut Duration
The starting time (mutable)
sourceimpl<C, I, R, SC> Serialize for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
C: Serialize + for<'a> Deserialize<'a>,
impl<C, I, R, SC> Serialize for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
C: Serialize + for<'a> Deserialize<'a>,
impl<C, I, R, SC> State for StdState<C, I, R, SC> where
C: Corpus<I>,
I: Input,
R: Rand,
SC: Corpus<I>,
Auto Trait Implementations
impl<C, I, R, SC> !RefUnwindSafe for StdState<C, I, R, SC>
impl<C, I, R, SC> !Send for StdState<C, I, R, SC>
impl<C, I, R, SC> !Sync for StdState<C, I, R, SC>
impl<C, I, R, SC> Unpin for StdState<C, I, R, SC> where
C: Unpin,
I: Unpin,
R: Unpin,
SC: Unpin,
impl<C, I, R, SC> !UnwindSafe for StdState<C, I, R, SC>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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. Read more
sourcefn 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.