pub struct Trace<M: Matcher> {
pub descriptors: Vec<AgentDescriptor>,
pub steps: Vec<Step<M>>,
pub prior_traces: Vec<Trace<M>>,
}
Fields§
§descriptors: Vec<AgentDescriptor>
§steps: Vec<Step<M>>
§prior_traces: Vec<Trace<M>>
Implementations§
source§impl<M: Matcher> Trace<M>
impl<M: Matcher> Trace<M>
pub fn count_functions_by_name(&self, find_name: &'static str) -> usize
pub fn count_functions(&self) -> usize
pub fn write_plots(&self, i: u16)
source§impl<M: Matcher> Trace<M>
impl<M: Matcher> Trace<M>
A Trace
consists of several Step
s. Each has either a OutputAction
or an InputAction
.
Each Step
s references an Agent
by name. Furthermore, a trace also has a list of
AgentDescriptors which act like a blueprint to spawn Agent
s with a corresponding server
or client role and a specific TLs version. Essentially they are an Agent
without a stream.
fn spawn_agents<PB: ProtocolBehavior>(
&self,
ctx: &mut TraceContext<PB>
) -> Result<(), Error>
pub fn execute<PB>(&self, ctx: &mut TraceContext<PB>) -> Result<(), Error>where
PB: ProtocolBehavior<Matcher = M>,
pub fn execute_deterministic<PB>(
&self,
put_registry: &PutRegistry<PB>,
default_put_options: PutOptions
) -> Result<TraceContext<PB>, Error>where
PB: ProtocolBehavior<Matcher = M>,
pub fn execute_with_non_default_puts<PB>(
&self,
put_registry: &PutRegistry<PB>,
descriptors: &[(AgentName, PutDescriptor)]
) -> Result<TraceContext<PB>, Error>where
PB: ProtocolBehavior<Matcher = M>,
pub fn serialize_postcard(&self) -> Result<Vec<u8>, Error>
pub fn deserialize_postcard(slice: &[u8]) -> Result<Trace<M>, Error>
Trait Implementations§
source§impl<'de, M> Deserialize<'de> for Trace<M>where
M: Matcher,
impl<'de, M> Deserialize<'de> for Trace<M>where
M: Matcher,
source§fn 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
source§impl<M: Matcher> Input for Trace<M>
impl<M: Matcher> Input for Trace<M>
source§fn generate_name(&self, _idx: usize) -> String
fn generate_name(&self, _idx: usize) -> String
Generate a name for this input, the user is responsible for making each name of testcase unique.
§fn to_file<P>(&self, path: P) -> Result<(), Error>where
P: AsRef<Path>,
fn to_file<P>(&self, path: P) -> Result<(), Error>where
P: AsRef<Path>,
Write this input to the file
§fn from_file<P>(path: P) -> Result<Self, Error>where
P: AsRef<Path>,
fn from_file<P>(path: P) -> Result<Self, Error>where
P: AsRef<Path>,
Load the content of this input from a file
§fn wrapped_as_testcase(&mut self)
fn wrapped_as_testcase(&mut self)
An hook executed if the input is stored as
Testcase
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for GenerateMutator<S, M>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for GenerateMutator<S, M>where
S: HasRand,
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for RemoveAndLiftMutator<S>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for RemoveAndLiftMutator<S>where
S: HasRand,
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for RepeatMutator<S>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for RepeatMutator<S>where
S: HasRand,
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for ReplaceMatchMutator<S>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for ReplaceMatchMutator<S>where
S: HasRand,
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for ReplaceReuseMutator<S>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for ReplaceReuseMutator<S>where
S: HasRand,
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for SkipMutator<S>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for SkipMutator<S>where
S: HasRand,
source§impl<S, M: Matcher> Mutator<Trace<M>, S> for SwapMutator<S>where
S: HasRand,
impl<S, M: Matcher> Mutator<Trace<M>, S> for SwapMutator<S>where
S: HasRand,
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Trace<M>
impl<M> Send for Trace<M>where
M: Send,
impl<M> Sync for Trace<M>where
M: Sync,
impl<M> Unpin for Trace<M>where
M: Unpin,
impl<M> !UnwindSafe for Trace<M>
Blanket Implementations§
§impl<I, S> MutatedTransform<I, S> for Iwhere
I: Input + Clone,
S: HasCorpus<Input = I>,
impl<I, S> MutatedTransform<I, S> for Iwhere
I: Input + Clone,
S: HasCorpus<Input = I>,
§fn try_transform_from(
base: &mut Testcase<I>,
state: &S,
_corpus_idx: CorpusId
) -> Result<I, Error>
fn try_transform_from(
base: &mut Testcase<I>,
state: &S,
_corpus_idx: CorpusId
) -> Result<I, Error>
Transform the provided testcase into this type
§fn try_transform_into(
self,
_state: &S
) -> Result<(I, <I as MutatedTransform<I, S>>::Post), Error>
fn try_transform_into(
self,
_state: &S
) -> Result<(I, <I as MutatedTransform<I, S>>::Post), Error>
Transform this instance back into the original input type
§impl<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.