Trait TokenLike

Source
pub trait TokenLike: Clone {
    // Required methods
    fn kind(&self) -> SyntaxKind;
    fn text(&self) -> TokenText<'_>;
    fn text_range(&self) -> NodeSpan;
}

Required Methods§

Source

fn kind(&self) -> SyntaxKind

Source

fn text(&self) -> TokenText<'_>

Source

fn text_range(&self) -> NodeSpan

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.

Implementations on Foreign Types§

Source§

impl TokenLike for (&SyntaxToken<PreprocessorLang>, FileId)

Source§

fn kind(&self) -> SyntaxKind

Source§

fn text(&self) -> TokenText<'_>

Source§

fn text_range(&self) -> NodeSpan

Source§

impl TokenLike for (SyntaxToken<PreprocessorLang>, FileId)

Source§

fn kind(&self) -> SyntaxKind

Source§

fn text(&self) -> TokenText<'_>

Source§

fn text_range(&self) -> NodeSpan

Implementors§