pub trait Nodes<'a: 'b, 'b> {
// Required methods
fn nodes(&'b self) -> NodeIter<'a, 'b> ⓘ;
fn span(&'b self) -> Span<'a>;
fn add_nodes(
&'b self,
dest: &mut Vec<Node<'a, 'b>>,
pred: fn(Node<'a, 'b>) -> bool,
);
// Provided method
fn find(&'b self, pred: fn(Node<'a, 'b>) -> bool) -> Vec<Node<'a, 'b>> { ... }
}Expand description
An object that can be represented as a collection of CST nodes
This is implemented by all individual CST nodes (see the associated
data for Node variants) to represent its subtree.
Required Methods§
Sourcefn nodes(&'b self) -> NodeIter<'a, 'b> ⓘ
fn nodes(&'b self) -> NodeIter<'a, 'b> ⓘ
The nodes of the object
This includes the object itself, as well as any/all children nodes, provided depth-first.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".