Skip to main content

Module node

Module node 

Source
Expand description

Types associated to nodes and in particular node walking.

Structs§

Ancestors
An iterator that iterates over the Node::parent elements of a node. This is used for iterating over the ancestors of a node.
Children
An iterator that iterates over the Node::next elements of a node. This is typically used for iterating over the children of a tree.
Inside
An iterator that limits the walk to inside the node it started at, visiting every node exactly once. This is constructed with Walk::inside.
Siblings
An iterator that iterates over a node and its Node::next siblings. Previous siblings are not included.
SkipTokens
Wrapped around an iterator that excludes nodes without children.
Walk
An iterator that walks over the entire tree, visiting every node exactly once.
WalkEvents
A low-level iterator which walks the tree while emitting Event instances indicating how the structure is being navigated.
WithDepths
An iterator that walks over the entire tree, visiting every node exactly once and yielding each node together with its depth. This is constructed with Walk::with_depths.

Enums§

Event
An event indicating how a tree is being walked with WalkEvents.