pub trait WalkSource {
// Required methods
fn listed(&self) -> &[TreeId];
fn node_tree(&self, tree: TreeId) -> Option<&NodeTree<Flm>>;
fn placement(&self, site: NodeAddr) -> Option<TreeId>;
}Expand description
The trees a Walk visits: trees by identifier, the trees of the
traversal list in order, and which node places which tree.
Walk defines document order and reads its trees through this trait, so
that the same order applies to any set of trees that represents a
document’s trees: DocContent is the source of the trees as parsed, and a
run is the source of its frozen trees, what each tree became after the
rewrites (StageCx::walk). The module
documentation describes the order.
Required Methods§
Sourcefn listed(&self) -> &[TreeId]
fn listed(&self) -> &[TreeId]
The trees of the traversal list, in the order the walk visits them. A tree that the walk reaches only through a node that places it is not in this list.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl WalkSource for DocContent
The content of a document is the walk’s source for its trees as parsed: the arena gives the trees, the traversal list the trees listed, and the resolution map the placements.