Trait puffin::protocol::EvaluatedTerm
source · pub trait EvaluatedTerm<PT: ProtocolTypes>: Debug + AsAny {
// Required method
fn extract_knowledge<'a>(
&'a self,
knowledges: &mut Vec<Knowledge<'a, PT>>,
matcher: Option<PT::Matcher>,
source: &'a Source,
) -> Result<(), Error>;
}
Expand description
Provide a way to extract knowledge out of a Message/OpaqueMessage or any type that might be used in a precomputation
Required Methods§
sourcefn extract_knowledge<'a>(
&'a self,
knowledges: &mut Vec<Knowledge<'a, PT>>,
matcher: Option<PT::Matcher>,
source: &'a Source,
) -> Result<(), Error>
fn extract_knowledge<'a>( &'a self, knowledges: &mut Vec<Knowledge<'a, PT>>, matcher: Option<PT::Matcher>, source: &'a Source, ) -> Result<(), Error>
Fill knowledges
with new knowledge gathered form the type implementing EvaluatedTerm
by recursively calling extract_knowledge on all contained element
This will put source as the source of all the produced knowledge, matcher is also passed
recursively but might be overwritten by a type with a more specific matcher