pub trait IKeyExprTreeExt<'a, Weight>: IKeyExprTree<'a, Weight> {
    // Provided methods
    fn weight_at(&'a self, key: &keyexpr) -> Option<&'a Weight> { ... }
    fn intersecting_keys(
        &'a self,
        key: &'a keyexpr
    ) -> FilterMap<Self::Intersection, fn(_: Self::IntersectionItem) -> Option<OwnedKeyExpr>> 
       where Self::IntersectionItem: AsNode<Self::Node>,
             Self::Node: IKeyExprTreeNode<Weight> { ... }
    fn included_keys(
        &'a self,
        key: &'a keyexpr
    ) -> FilterMap<Self::Inclusion, fn(_: Self::InclusionItem) -> Option<OwnedKeyExpr>> 
       where Self::InclusionItem: AsNode<Self::Node>,
             Self::Node: IKeyExprTreeNode<Weight> { ... }
    fn key_value_pairs(
        &'a self
    ) -> FilterMap<Self::TreeIter, fn(_: Self::TreeIterItem) -> Option<(OwnedKeyExpr, &'a Weight)>> 
       where Self::TreeIterItem: AsNode<Box<Self::Node>> { ... }
}
Expand description

Extension methods for KeTrees

Provided Methods§

source

fn weight_at(&'a self, key: &keyexpr) -> Option<&'a Weight>

Returns a reference to the weight of the node at key

source

fn intersecting_keys( &'a self, key: &'a keyexpr ) -> FilterMap<Self::Intersection, fn(_: Self::IntersectionItem) -> Option<OwnedKeyExpr>>
where Self::IntersectionItem: AsNode<Self::Node>, Self::Node: IKeyExprTreeNode<Weight>,

Returns an iterator over the KEs contained in the tree that intersect with key

source

fn included_keys( &'a self, key: &'a keyexpr ) -> FilterMap<Self::Inclusion, fn(_: Self::InclusionItem) -> Option<OwnedKeyExpr>>
where Self::InclusionItem: AsNode<Self::Node>, Self::Node: IKeyExprTreeNode<Weight>,

Returns an iterator over the KEs contained in the tree that are included by key

source

fn key_value_pairs( &'a self ) -> FilterMap<Self::TreeIter, fn(_: Self::TreeIterItem) -> Option<(OwnedKeyExpr, &'a Weight)>>
where Self::TreeIterItem: AsNode<Box<Self::Node>>,

Iterates through weighted nodes, yielding their KE and Weight.

Implementors§

source§

impl<'a, Weight, T: IKeyExprTree<'a, Weight>> IKeyExprTreeExt<'a, Weight> for T