#[non_exhaustive]pub enum Token {
Show 33 variants
Now,
Today,
Tomorrow,
Yesterday,
Overmorrow,
Ereyesterday,
Next,
Last,
This,
In,
Ago,
From,
A,
An,
At,
And,
Am,
Pm,
Unit(TemporalUnit),
Weekday(Weekday),
Month(i8),
Number(i64),
Colon,
Dash,
Slash,
AtSign,
Plus,
After,
Before,
Quarter(i8),
Boundary(BoundaryKind),
EpochSuffix(EpochPrecision),
Word(String),
}Expand description
Lexer token types.
Keywords are simple enum variants with zero heap allocation.
Only Word(String) carries owned data (for unrecognized words in error messages).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Now
Today
Tomorrow
Yesterday
Overmorrow
Ereyesterday
Next
Last
This
In
Ago
From
A
An
At
And
Am
Pm
Unit(TemporalUnit)
Weekday(Weekday)
Month(i8)
Number(i64)
Colon
Dash
Slash
AtSign
Plus
After
Before
Quarter(i8)
Boundary(BoundaryKind)
EpochSuffix(EpochPrecision)
Word(String)
Trait Implementations§
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