Struct libafl::state::StdState[][src]

pub struct StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
{ /* fields omitted */ }
Expand description

The state a fuzz run.

Implementations

impl<C, FT, R, SC> StdState<C, FT, BytesInput, R, SC> where
    C: Corpus<BytesInput>,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<BytesInput>, 
[src]

pub fn load_initial_inputs<E, EM, Z>(
    &mut self,
    fuzzer: &mut Z,
    executor: &mut E,
    manager: &mut EM,
    in_dirs: &[PathBuf]
) -> Result<(), Error> where
    Z: Evaluator<E, EM, BytesInput, Self>,
    EM: EventManager<E, BytesInput, Self, Z>, 
[src]

Loads initial inputs from the passed-in in_dirs.

impl<C, FT, I, R, SC> StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

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, R>,
    Z: Evaluator<E, EM, I, Self>,
    EM: EventManager<E, I, Self, Z>, 
[src]

Generate num initial inputs, using the passed-in generator.

pub fn new(rand: R, corpus: C, solutions: SC, feedback_states: FT) -> Self[src]

Creates a new State, taking ownership of all of the individual components during fuzzing.

Trait Implementations

impl<C: Clone, FT: Clone, I: Clone, R: Clone, SC: Clone> Clone for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn clone(&self) -> StdState<C, FT, I, R, SC>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<C: Debug, FT: Debug, I: Debug, R: Debug, SC: Debug> Debug for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de, C, FT, I, R, SC> Deserialize<'de> for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>,
    FT: DeserializeOwned
[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<C, FT, I, R, SC> HasClientPerfStats for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

impl<C, FT, I, R, SC> HasCorpus<C, I> for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn corpus(&self) -> &C[src]

Returns the corpus

fn corpus_mut(&mut self) -> &mut C[src]

Returns the mutable corpus

impl<C, FT, I, R, SC> HasExecutions for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn executions(&self) -> &usize[src]

The executions counter

fn executions_mut(&mut self) -> &mut usize[src]

The executions counter (mut)

impl<C, FT, I, R, SC> HasFeedbackStates<FT> for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn feedback_states(&self) -> &FT[src]

The feedback states

fn feedback_states_mut(&mut self) -> &mut FT[src]

The feedback states (mut)

impl<C, FT, I, R, SC> HasMaxSize for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn max_size(&self) -> usize[src]

The maximum size hint for items and mutations returned

fn set_max_size(&mut self, max_size: usize)[src]

Sets the maximum size hint for the items and mutations

impl<C, FT, I, R, SC> HasMetadata for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn metadata(&self) -> &SerdeAnyMap[src]

Get all the metadata into an hashbrown::HashMap

fn metadata_mut(&mut self) -> &mut SerdeAnyMap[src]

Get all the metadata into an hashbrown::HashMap (mutable)

fn add_metadata<M>(&mut self, meta: M) where
    M: SerdeAny
[src]

Add a metadata to the metadata map

fn has_metadata<M>(&self) -> bool where
    M: SerdeAny
[src]

Check for a metadata

impl<C, FT, I, R, SC> HasRand<R> for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn rand(&self) -> &R[src]

The rand instance

fn rand_mut(&mut self) -> &mut R[src]

The rand instance (mut)

impl<C, FT, I, R, SC> HasSolutions<SC, I> for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn solutions(&self) -> &SC[src]

Returns the solutions corpus

fn solutions_mut(&mut self) -> &mut SC[src]

Returns the solutions corpus (mut)

impl<C, FT, I, R, SC> HasStartTime for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

fn start_time(&self) -> &Duration[src]

The starting time

fn start_time_mut(&mut self) -> &mut Duration[src]

The starting time (mut)

impl<C, FT, I, R, SC> Serialize for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>,
    FT: DeserializeOwned
[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl<C, FT, I, R, SC> State for StdState<C, FT, I, R, SC> where
    C: Corpus<I>,
    I: Input,
    R: Rand,
    FT: FeedbackStatesTuple,
    SC: Corpus<I>, 
[src]

Auto Trait Implementations

impl<C, FT, I, R, SC> !RefUnwindSafe for StdState<C, FT, I, R, SC>

impl<C, FT, I, R, SC> !Send for StdState<C, FT, I, R, SC>

impl<C, FT, I, R, SC> !Sync for StdState<C, FT, I, R, SC>

impl<C, FT, I, R, SC> Unpin for StdState<C, FT, I, R, SC> where
    C: Unpin,
    FT: Unpin,
    I: Unpin,
    R: Unpin,
    SC: Unpin

impl<C, FT, I, R, SC> !UnwindSafe for StdState<C, FT, I, R, SC>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<Tail, T> Prepend<T> for Tail[src]

type PreprendResult = Tail

The Resulting TupleList, of an Prepend::prepend() call, including the prepended entry. Read more

pub fn prepend(Self, T) -> (T, <Tail as Prepend<T>>::PreprendResult)[src]

Prepend a value to this tuple, returning a new tuple with prepended value.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

pub fn erased_serialize(
    &self,
    serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]