pub struct Traversal;
Expand description
Type with methods allowing to create different Traverser
types with
different walk strategies, such as depth-first, breadth-first or post-order.
Implementationsยง
Sourceยงimpl Traversal
impl Traversal
Sourcepub fn dfs(self) -> Dfs
pub fn dfs(self) -> Dfs
Creates the default (pre-order) depth-first-search traverser (Wikipedia).
The default traverser creates iterators that yield references or mutable references
to the node data; i.e., OverData
.
However, item type of the iterators that the traverser creates can be transformed any time using the transformation methods:
Sourcepub fn bfs(self) -> Bfs
pub fn bfs(self) -> Bfs
Creates the default breadth-first-search traverser, also known as level-order (wikipedia)
The default traverser creates iterators that yield references or mutable references
to the node data; i.e., OverData
.
However, item type of the iterators that the traverser creates can be transformed any time using the transformation methods: