pub trait HasChildren<'tree>: Node<'tree> {
type Child: Node<'tree>;
// Provided method
fn children<'a>(
&self,
c: &'a mut TreeCursor<'tree>,
) -> impl Iterator<Item = NodeResult<'tree, Self::Child>> + 'a
where Self: 'a { ... }
}Expand description
A node that has multiple named children (besides extras) and no fields.
The trait mainly exists for the associated type, because usually these kinds of nodes’ child type is anonymous.
Required Associated Types§
Provided Methods§
Sourcefn children<'a>(
&self,
c: &'a mut TreeCursor<'tree>,
) -> impl Iterator<Item = NodeResult<'tree, Self::Child>> + 'awhere
Self: 'a,
fn children<'a>(
&self,
c: &'a mut TreeCursor<'tree>,
) -> impl Iterator<Item = NodeResult<'tree, Self::Child>> + 'awhere
Self: 'a,
Gets the node’s not-extra named children.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.