Module traversal

Source
Expand description

Module defining tree traversal iterators.

Structs§

Bfs
A breadth first search traverser, also known as level-order (wikipedia).
Dfs
A (pre-order) depth first search traverser (Wikipedia).
OverData
Yields the data of the nodes; i.e., data and data_mut.
OverDepthData
Yields (depth, data) tuple of the nodes; where data might be data and data_mut.
OverDepthNode
Yields (depth, Node) tuple of the nodes.
OverDepthSiblingIdxData
Yields (depth, sibling_idx, data) tuple of the nodes; where data might be data and data_mut.
OverDepthSiblingIdxNode
Yields (depth, sibling_idx, Node) tuple of the nodes.
OverNode
Yields a reference to the nodes; i.e., Node.
OverSiblingIdxData
Yields (sibling_idx, data) tuple of the nodes; where data might be data and data_mut.
OverSiblingIdxNode
Yields (sibling_idx, Node) tuple of the nodes.
PostOrder
A post order traverser (Wikipedia).
Traversal
Type with methods allowing to create different Traverser types with different walk strategies, such as depth-first, breadth-first or post-order.

Traits§

Over
Type that defines the type of the items that iterators created by a traverser such as the Dfs or PostOrder.
OverMut
Type that defines the type of the mutable items that iterators created by a traverser such as the Dfs or PostOrder.
Traverser
A tree traverser that creates iterators which walk over a given node and all of its descendants; i.e., over all nodes of the subtree rooted at the given node.