pub struct StateObserver<PS> where
    PS: Clone + Debug + Eq + Hash
{ /* private fields */ }
Expand description

An observer that builds a state-graph.

The states that this observer stores must implement the following traits: Eq, Hash, Debug, Clone, Serialize, Deserialize. Most commonly used state types are u64, u32 or [u8; N] with N <= 32.

When you create a StateObserver always specify PS manually:

type State = u64;
let observer = StateObserver::<State>::new("state observer");

The executor is responsible for calling StateObserver::record() with states inferred from the fuzz target.

Implementations

Create a new StateObserver with a given name.

Tell the observer that the target has entered state state.

Returns whether any new edges were created in the state-graph during the last run. Used by StateFeedback.

Returns the number of vertices and edges in the state-graph. Used by StateFeedback.

Returns a DOT representation of the statemachine.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Provide the name of this element.

Called right before execution starts.

Called right after execution finishes.

The testcase finished execution, calculate any changes. Reserved for future use. Read more

Called right before execution starts in the child process, if any.

Called right after execution finishes in the child process, if any.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.