Module traversal

Module traversal 

Source
Expand description

Datafusion inspired tree traversal logic.

Users should want to implement Node and potentially NodeContainer.

Structs§

ReferenceCollector
Transformed

Enums§

FoldDown
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.
FoldDownContext
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.
TraversalOrder
Signal to control a traversal’s flow

Traits§

Node
NodeContainer
A container holding a Node’s children, which a function can be applied (or mapped) to.
NodeExt
NodeFolder
This trait is used to implemet a fold (see NodeFolderContext), but without a context.
NodeFolderContext
Use to implement the folding a tree like structure in a pre-order traversal.
NodeRefContainer
NodeRewriter
NodeVisitor

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.