pub enum Token {
Show 36 variants
StartComment,
UnexpectedToken,
Equals,
LParen,
RParen,
LBrace,
RBrace,
Semi,
Comma,
Dot,
Colon,
Arrow,
Null,
Vec,
Record,
Variant,
Func,
Service,
Oneway,
Query,
Blob,
Type,
Import,
Opt,
TestEqual,
NotEqual,
NotDecode,
Principal,
Id(String),
StartString,
Text(String),
Sign(char),
Decimal(String),
Hex(String),
Float(String),
Boolean(bool),
}
Variants
StartComment
UnexpectedToken
Equals
LParen
RParen
LBrace
RBrace
Semi
Comma
Dot
Colon
Arrow
Null
Vec
Record
Variant
Func
Service
Oneway
Query
Blob
Type
Import
Opt
TestEqual
NotEqual
NotDecode
Principal
Id(String)
StartString
Text(String)
Sign(char)
Decimal(String)
Hex(String)
Float(String)
Boolean(bool)
Trait Implementations
sourceimpl<'s> Logos<'s> for Token
impl<'s> Logos<'s> for Token
type Extras = ()
type Extras = ()
Associated type
Extras
for the particular lexer. This can be set using
#[logos(extras = MyExtras)]
and accessed inside callbacks. Read moretype Source = str
type Source = str
Source type this token can be lexed from. This will default to
str
,
unless one of the defined patterns explicitly uses non-unicode byte values
or byte slices, in which case that implementation will use [u8]
. Read moresourceimpl Ord for Token
impl Ord for Token
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Token> for Token
impl PartialOrd<Token> for Token
sourcefn partial_cmp(&self, other: &Token) -> Option<Ordering>
fn partial_cmp(&self, other: &Token) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Token
impl StructuralEq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more