pub trait ExternalCstNode: Sized + Spanned {
type Children<'syntax>: Iterator<Item = ExternalCstChild<Self>>
where Self: 'syntax;
// Required methods
fn identity(&self) -> CSTNodeClassLabel<'_>;
fn children(&self) -> Self::Children<'_>;
fn text(&self) -> Cow<'_, str>;
// Provided method
fn is_extra(&self) -> bool { ... }
}Expand description
Minimal untyped view required to migrate generated typed nodes.
This trait is deliberately confined to parser adapters. Its homogeneous child iterator must not be used to model or walk the typed syntax graph.
Required Associated Types§
Sourcetype Children<'syntax>: Iterator<Item = ExternalCstChild<Self>>
where
Self: 'syntax
type Children<'syntax>: Iterator<Item = ExternalCstChild<Self>> where Self: 'syntax
The iterator returned by Self::children.
Required Methods§
Sourcefn identity(&self) -> CSTNodeClassLabel<'_>
fn identity(&self) -> CSTNodeClassLabel<'_>
Returns the node kind used by migration matching.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".