Struct puffin::trace::KnowledgeStore
source · pub struct KnowledgeStore<PT: ProtocolTypes> {
raw_knowledge: Vec<RawKnowledge<PT>>,
}
Fields§
§raw_knowledge: Vec<RawKnowledge<PT>>
Implementations§
source§impl<PT: ProtocolTypes> KnowledgeStore<PT>
impl<PT: ProtocolTypes> KnowledgeStore<PT>
pub fn new() -> Self
pub fn add_raw_knowledge<T: EvaluatedTerm<PT> + 'static>( &mut self, data: T, source: Source, term: Option<Term<PT>>, )
pub fn add_raw_boxed_knowledge( &mut self, data: Box<dyn EvaluatedTerm<PT>>, source: Source, term: Option<Term<PT>>, )
pub fn number_matching_message_with_source( &self, source: Source, type_id: TypeId, tls_message_type: &Option<PT::Matcher>, ) -> usize
sourcepub fn number_matching_message(
&self,
type_id: TypeId,
tls_message_type: &Option<PT::Matcher>,
) -> usize
pub fn number_matching_message( &self, type_id: TypeId, tls_message_type: &Option<PT::Matcher>, ) -> usize
Count the number of sub-messages of type type_id
in the output message.
sourcepub fn find_variable(
&self,
query_type_shape: TypeShape<PT>,
query: &Query<PT::Matcher>,
) -> Option<&dyn VariableData<PT>>
pub fn find_variable( &self, query_type_shape: TypeShape<PT>, query: &Query<PT::Matcher>, ) -> Option<&dyn VariableData<PT>>
Returns the variable which matches best -> highest specificity If we want a variable with lower specificity, then we can just query less specific
Trait Implementations§
source§impl<PT: Debug + ProtocolTypes> Debug for KnowledgeStore<PT>
impl<PT: Debug + ProtocolTypes> Debug for KnowledgeStore<PT>
source§impl<PT: Default + ProtocolTypes> Default for KnowledgeStore<PT>
impl<PT: Default + ProtocolTypes> Default for KnowledgeStore<PT>
source§fn default() -> KnowledgeStore<PT>
fn default() -> KnowledgeStore<PT>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<PT> Freeze for KnowledgeStore<PT>
impl<PT> !RefUnwindSafe for KnowledgeStore<PT>
impl<PT> !Send for KnowledgeStore<PT>
impl<PT> !Sync for KnowledgeStore<PT>
impl<PT> Unpin for KnowledgeStore<PT>
impl<PT> !UnwindSafe for KnowledgeStore<PT>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§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.