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>,
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 introspection_monitor(&self) -> &ClientPerfMonitor
fn introspection_monitor(&self) -> &ClientPerfMonitor
ClientPerfMonitor
itselfsourcefn introspection_monitor_mut(&mut self) -> &mut ClientPerfMonitor
fn introspection_monitor_mut(&mut self) -> &mut ClientPerfMonitor
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,
sourcefn has_metadata<M>(&self) -> boolwhere
M: SerdeAny,
fn has_metadata<M>(&self) -> boolwhere
M: SerdeAny,
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,
sourcefn has_named_metadata<M>(&self, name: &str) -> boolwhere
M: SerdeAny,
fn has_named_metadata<M>(&self, name: &str) -> boolwhere
M: SerdeAny,
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)