Trait acacia::traits::ObjectQuery
[−]
[src]
pub trait ObjectQuery: Node + Sized {
fn query_objects<'a, R>(&'a self, recurse: R) -> RecurseObjects<'a, Self, R> where R: Fn(&Self) -> bool;
}
A tree that allows recursive queries on its objects. A closure is used to determine the recursion behavior.
This is an extension trait of Node
.
Required Methods
fn query_objects<'a, R>(&'a self, recurse: R) -> RecurseObjects<'a, Self, R> where R: Fn(&Self) -> bool
Iterate over objects through all nodes.
This method yields an iterator that walks recursively through the tree,
as deep as recurse
prescribes.
Empty nodes and branch nodes with !recurse(&node)
are omitted, whereas
the iterator considers every object in a leaf node.
Parameters
- At each branching node the tree is only recursed further, iff
recurse(&node)
.