Expand description
Datafusion inspired tree traversal logic.
Users should want to implement Node
and potentially NodeContainer
.
Structs§
Enums§
- Fold
Down - Use to indicate the control flow of the fold on the downwards pass.
Stop
indicates that the fold should stop.Skip
indicates that the fold should skip the children of the current node.Continue
indicates that the fold should continue. - Fold
Down Context - Use to indicate the control flow of the fold on the downwards pass.
In the case of Continue, the context is passed on to the children nodes.
Other cases are the same as
FoldDown
. - FoldUp
- Use to indicate the control flow of the fold on the upwards pass.
Stop
indicates that the fold should stop at the current position and return the result. - Traversal
Order - Signal to control a traversal’s flow
Traits§
- Node
- Node
Container - A container holding a
Node
’s children, which a function can be applied (or mapped) to. - NodeExt
- Node
Folder - This trait is used to implemet a fold (see
NodeFolderContext
), but without a context. - Node
Folder Context - Use to implement the folding a tree like structure in a pre-order traversal.
- Node
RefContainer - Node
Rewriter - Node
Visitor
Functions§
- pre_
order_ visit_ down - Traverse a
Node
-based tree using a closure. It will do it by walking the tree from the top going down. - pre_
order_ visit_ up - Traverse a
Node
-based tree using a closure. It will do it by walking the tree from the bottom going up.