pub trait TreeToken:
Clone
+ Debug
+ PartialEq
+ Eq
+ Hash {
type Node: TreeNode;
// Required methods
fn parent(&self) -> Self::Node;
fn kind(&self) -> SyntaxKind;
fn text(&self) -> &str;
fn span(&self) -> Span;
}Expand description
A trait that abstracts the underlying representation of a syntax token.
Required Associated Types§
Required Methods§
Sourcefn kind(&self) -> SyntaxKind
fn kind(&self) -> SyntaxKind
Gets the syntax kind for the token.
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.