pub trait Terminal: TypedSyntaxNode {
type TokenType: Token;
const KIND: SyntaxKind;
// Required methods
fn new_green(
db: &dyn SyntaxGroup,
leading_trivia: TriviaGreen,
token: <<Self as Terminal>::TokenType as TypedSyntaxNode>::Green,
trailing_trivia: TriviaGreen,
) -> <Self as TypedSyntaxNode>::Green;
fn text(&self, db: &dyn SyntaxGroup) -> SmolStr;
}
Required Associated Constants§
const KIND: SyntaxKind
Required Associated Types§
Required Methods§
fn new_green( db: &dyn SyntaxGroup, leading_trivia: TriviaGreen, token: <<Self as Terminal>::TokenType as TypedSyntaxNode>::Green, trailing_trivia: TriviaGreen, ) -> <Self as TypedSyntaxNode>::Green
sourcefn text(&self, db: &dyn SyntaxGroup) -> SmolStr
fn text(&self, db: &dyn SyntaxGroup) -> SmolStr
Returns the text of the token of this terminal (excluding the trivia).
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.