pub trait IKeyExprTree<'a, Weight> {
    type Node: IKeyExprTreeNodeMut<Weight>;
    type TreeIterItem;
    type TreeIter: Iterator<Item = Self::TreeIterItem>;
    type IntersectionItem;
    type Intersection: Iterator<Item = Self::IntersectionItem>;
    type InclusionItem;
    type Inclusion: Iterator<Item = Self::InclusionItem>;

    // Required methods
    fn node(&'a self, key: &keyexpr) -> Option<&Self::Node>;
    fn tree_iter(&'a self) -> Self::TreeIter;
    fn intersecting_nodes(&'a self, key: &'a keyexpr) -> Self::Intersection;
    fn included_nodes(&'a self, key: &'a keyexpr) -> Self::Inclusion;
}
Expand description

The basic immutable methods of all all KeTrees

Required Associated Types§

Required Methods§

source

fn node(&'a self, key: &keyexpr) -> Option<&Self::Node>

Accesses the node at key if it exists, treating KEs as if they were litteral keys.

source

fn tree_iter(&'a self) -> Self::TreeIter

Iterates over the whole tree, including nodes with no weight.

source

fn intersecting_nodes(&'a self, key: &'a keyexpr) -> Self::Intersection

Iterates over all nodes of the tree whose KE intersects with the given key.

Note that nodes without a Weight will also be yielded by the iterator.

source

fn included_nodes(&'a self, key: &'a keyexpr) -> Self::Inclusion

Iterates over all nodes of the tree whose KE is included by the given key.

Note that nodes without a Weight will also be yielded by the iterator.

Implementors§

source§

impl<'a, Weight, Children, Wildness: IWildness> IKeyExprTree<'a, Weight> for KeBoxTree<Weight, Wildness, Children>
where Weight: 'a, Children: 'a + IChildrenProvider<Box<KeyExprTreeNode<Weight, Wildness, Children>>>, Children::Assoc: IChildren<Box<KeyExprTreeNode<Weight, Wildness, Children>>, Node = Box<KeyExprTreeNode<Weight, Wildness, Children>>> + 'a,

§

type Node = KeyExprTreeNode<Weight, Wildness, Children>

§

type TreeIterItem = <<KeBoxTree<Weight, Wildness, Children> as IKeyExprTree<'a, Weight>>::TreeIter as Iterator>::Item

§

type TreeIter = TreeIter<'a, Children, Box<KeyExprTreeNode<Weight, Wildness, Children>>, Weight>

§

type IntersectionItem = <<KeBoxTree<Weight, Wildness, Children> as IKeyExprTree<'a, Weight>>::Intersection as Iterator>::Item

§

type Intersection = IterOrOption<Intersection<'a, Children, Box<KeyExprTreeNode<Weight, Wildness, Children>>, Weight>, &'a <KeBoxTree<Weight, Wildness, Children> as IKeyExprTree<'a, Weight>>::Node>

§

type InclusionItem = <<KeBoxTree<Weight, Wildness, Children> as IKeyExprTree<'a, Weight>>::Inclusion as Iterator>::Item

§

type Inclusion = IterOrOption<Inclusion<'a, Children, Box<KeyExprTreeNode<Weight, Wildness, Children>>, Weight>, &'a <KeBoxTree<Weight, Wildness, Children> as IKeyExprTree<'a, Weight>>::Node>