pub trait AstNode: Sized {
// Required methods
fn can_cast(kind: SyntaxKind) -> bool;
fn cast(node: GdNode) -> Option<Self>;
fn syntax(&self) -> &GdNode;
}Expand description
A typed node: a checked view over a red node of one SyntaxKind.
Required Methods§
Sourcefn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Whether a node of kind can be viewed as Self.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".