pub struct Token {
pub kind: TokenKind,
pub span: Span,
pub indent: usize,
pub leading_trivia: Vec<TriviaPiece>,
}Expand description
A single token produced by the lexer.
Fields§
§kind: TokenKind§span: SpanByte span of the meaningful content.
indent: usizeColumn (0-based) of the first byte, with tabs expanded to multiples of 8.
leading_trivia: Vec<TriviaPiece>Trivia that precedes this token (whitespace, newlines, comments).
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