Skip to main content

Module node

Module node 

Source
Expand description

Types associated to nodes and in particular node walking.

Structs§

Ancestors
An iterator over an element and its ancestors, starting with the element itself and following Node::parent up to the root.
Children
An iterator over the children of a node or the root of a tree, nodes and tokens in order.
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.
Node
An interior node in the tree, one which was opened with Builder::open or wrapped with Builder::close_at.
Siblings
An iterator over an element and its following siblings, nodes and tokens in order. Previous siblings are not included.
SkipTokens
Wrapped around an iterator that excludes tokens, yielding only interior Nodes.
Token
A token in the tree, one which was added with Builder::token or its variants.
Walk
An iterator that walks over the entire tree in depth-first order, visiting every node and token 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.
NodeOrToken
Either a node or a token.

Type Aliases§

Element
A node or a token in a tree.