pub struct Token { /* private fields */ }Implementations§
Source§impl Token
impl Token
pub const fn kind(&self) -> &TokenKind
pub const fn pos(&self) -> Pos
pub const fn start(&self) -> ByteOffset
pub const fn end(&self) -> ByteOffset
pub const fn span(&self) -> ByteSpan
Sourcepub const fn is_virtual(&self) -> bool
pub const fn is_virtual(&self) -> bool
Layout-inserted tokens carry no source bytes (they are zero-width); AST node-span computation skips them so spans tile the real source.
Trait Implementations§
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more