pub trait AstNode<'a>: Sized {
// Required methods
fn from_untyped(node: &'a SyntaxNode) -> Option<Self>;
fn to_untyped(self) -> &'a SyntaxNode;
// Provided method
fn span(self) -> Span { ... }
}Expand description
A typed AST node.
Required Methods§
Sourcefn from_untyped(node: &'a SyntaxNode) -> Option<Self>
fn from_untyped(node: &'a SyntaxNode) -> Option<Self>
Convert a node into its typed variant.
Sourcefn to_untyped(self) -> &'a SyntaxNode
fn to_untyped(self) -> &'a SyntaxNode
A reference to the underlying syntax node.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".