pub trait SyntaxNodeExt {
// Required method
fn for_each_terminal<'db>(
&self,
db: &'db dyn Database,
callback: impl FnMut(&SyntaxNode<'db>),
)
where Self: 'db;
}Required Methods§
Sourcefn for_each_terminal<'db>(
&self,
db: &'db dyn Database,
callback: impl FnMut(&SyntaxNode<'db>),
)where
Self: 'db,
fn for_each_terminal<'db>(
&self,
db: &'db dyn Database,
callback: impl FnMut(&SyntaxNode<'db>),
)where
Self: 'db,
Faster than SyntaxNode::tokens because we don’t travel each leaf, and does not allocate.
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.