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 more
type 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 more
sourcefn lex(lex: &mut Lexer<'s, Self>)
fn lex(lex: &mut Lexer<'s, Self>)
The heart of Logos. Called by the Lexer
. The implementation for this function
is generated by the logos-derive
crate. Read more
sourceimpl Ord for Token
impl Ord for Token
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more