Trait puffin::protocol::Extractable

source ·
pub trait Extractable<PT: ProtocolTypes>: Debug + AsAny
where Self: 'static,
{ // 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

Fill knowledges with new knowledge gathered form the type implementing EvaluatedTerm by recursively calling extract_knowledge on all contained element Knowledges can be extracted from using extract_knowledge

Required Methods§

source

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

Implementors§