Struct puffin::trace::KnowledgeStore
source · pub struct KnowledgeStore<PB: ProtocolBehavior> {
knowledge: Vec<Knowledge<PB::Matcher>>,
}
Fields§
§knowledge: Vec<Knowledge<PB::Matcher>>
Implementations§
source§impl<PB: ProtocolBehavior> KnowledgeStore<PB>
impl<PB: ProtocolBehavior> KnowledgeStore<PB>
pub fn new() -> Self
pub fn add_knowledge(&mut self, knowledge: Knowledge<PB::Matcher>)
pub fn do_extract_knowledge<T: ExtractKnowledge<PB::Matcher> + 'static>(
&mut self,
data: T,
source: Source
) -> Result<usize, Error>
pub fn number_matching_message_with_source(
&self,
source: Source,
type_id: TypeId,
tls_message_type: &Option<PB::Matcher>
) -> usize
sourcepub fn number_matching_message(
&self,
type_id: TypeId,
tls_message_type: &Option<PB::Matcher>
) -> usize
pub fn number_matching_message(
&self,
type_id: TypeId,
tls_message_type: &Option<PB::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,
query: &Query<PB::Matcher>
) -> Option<&dyn VariableData>
pub fn find_variable(
&self,
query_type_shape: TypeShape,
query: &Query<PB::Matcher>
) -> Option<&dyn VariableData>
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§
Auto Trait Implementations§
impl<PB> !RefUnwindSafe for KnowledgeStore<PB>
impl<PB> !Send for KnowledgeStore<PB>
impl<PB> !Sync for KnowledgeStore<PB>
impl<PB> Unpin for KnowledgeStore<PB>where
<PB as ProtocolBehavior>::Matcher: Unpin,
impl<PB> !UnwindSafe for KnowledgeStore<PB>
Blanket Implementations§
§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.