pub struct Knowledge<'a, PT: ProtocolTypes> {
pub source: &'a Source,
pub matcher: Option<PT::Matcher>,
pub data: &'a dyn VariableData<PT>,
}
Expand description
Knowledge describes an atomic piece of knowledge inferred by the
crate::protocol::EvaluatedTerm::extract_knowledge
function
Knowledge is made of the data, the source of the output, the
TLS message type and the internal type.
Fields§
§source: &'a Source
§matcher: Option<PT::Matcher>
§data: &'a dyn VariableData<PT>
Implementations§
source§impl<PT: ProtocolTypes> Knowledge<'_, PT>
impl<PT: ProtocolTypes> Knowledge<'_, PT>
pub fn specificity(&self) -> u32
source§impl<PT: ProtocolTypes> Knowledge<'_, PT>
impl<PT: ProtocolTypes> Knowledge<'_, PT>
pub fn debug_print<PB>(&self, ctx: &TraceContext<PB>, source: &Source)where
PB: ProtocolBehavior<ProtocolTypes = PT>,
Trait Implementations§
Auto Trait Implementations§
impl<'a, PT> Freeze for Knowledge<'a, PT>
impl<'a, PT> !RefUnwindSafe for Knowledge<'a, PT>
impl<'a, PT> !Send for Knowledge<'a, PT>
impl<'a, PT> !Sync for Knowledge<'a, PT>
impl<'a, PT> Unpin for Knowledge<'a, PT>
impl<'a, PT> !UnwindSafe for Knowledge<'a, 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.