Struct puffin::trace::TraceContext

source ·
pub struct TraceContext<PB: ProtocolBehavior> {
    pub knowledge_store: KnowledgeStore<PB>,
    agents: Vec<Agent<PB>>,
    claims: GlobalClaimList<<PB as ProtocolBehavior>::Claim>,
    put_registry: PutRegistry<PB>,
    deterministic_put: bool,
    default_put_options: PutOptions,
    non_default_put_descriptors: HashMap<AgentName, PutDescriptor>,
    phantom: PhantomData<PB>,
}
Expand description

The TraceContext contains a list of VariableData, which is known as the knowledge of the attacker. VariableData can contain data of various types like for example client and server extensions, cipher suits or session ID It also holds the concrete references to the Agents and the underlying streams, which contain the messages which have need exchanged and are not yet processed by an output step.

Fields§

§knowledge_store: KnowledgeStore<PB>

The knowledge of the attacker

§agents: Vec<Agent<PB>>§claims: GlobalClaimList<<PB as ProtocolBehavior>::Claim>§put_registry: PutRegistry<PB>§deterministic_put: bool§default_put_options: PutOptions§non_default_put_descriptors: HashMap<AgentName, PutDescriptor>§phantom: PhantomData<PB>

Implementations§

Count the number of sub-messages of type type_id with the correct source

Count the number of sub-messages of type type_id in the output message.

Returns the variable which matches best -> highest specificity If we want a variable with lower specificity, then we can just query less specific

Adds data to the inbound Channel of the Agent referenced by the parameter “agent”.

Takes data from the outbound Channel of the Agent referenced by the parameter “agent”. See crate::stream::Stream::take_message_from_outbound

Gets the PUT descriptor which should be used for all agents

Makes agents use the non-default PUT

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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.
Prepend a value to this tuple, returning a new tuple with prepended value.
Converts the given value to a String. Read more
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.