Trait rnix::ast::AstToken

source ·
pub trait AstToken {
    fn can_cast(from: SyntaxKind) -> bool
    where
        Self: Sized
; fn cast(from: SyntaxToken) -> Option<Self>
    where
        Self: Sized
; fn syntax(&self) -> &SyntaxToken; }

Required Methods

Cast an untyped token into this strongly-typed token. This will return None if the type was not correct.

Implementors