pub enum TokenKind {
Show 87 variants
Invalid,
Comment,
Literal,
Identifier,
As,
Break,
Cl,
Const,
Continue,
Else,
Enum,
False,
Fn,
For,
If,
Impl,
In,
Let,
Loop,
Match,
Mod,
Mut,
Pub,
Return,
SelfKw,
SelfTy,
Static,
Struct,
Super,
True,
Type,
Use,
While,
LCurly,
RCurly,
LBrack,
RBrack,
LParen,
RParen,
Amp,
AmpAmp,
AmpEq,
Arrow,
At,
Backslash,
Bang,
BangBang,
BangEq,
Bar,
BarBar,
BarEq,
Colon,
ColonColon,
Comma,
Dot,
DotDot,
DotDotEq,
Eq,
EqEq,
FatArrow,
Grave,
Gt,
GtEq,
GtGt,
GtGtEq,
Hash,
HashBang,
Lt,
LtEq,
LtLt,
LtLtEq,
Minus,
MinusEq,
Plus,
PlusEq,
Question,
Rem,
RemEq,
Semi,
Slash,
SlashEq,
Star,
StarEq,
Tilde,
Xor,
XorEq,
XorXor,
}
Expand description
Stores a Token’s lexical information
Variants§
Invalid
Invalid sequence
Comment
Any kind of comment
Literal
Any tokenizable literal (See TokenData)
Identifier
A non-keyword identifier
As
Break
Cl
Const
Continue
Else
Enum
False
Fn
For
If
Impl
In
Let
Loop
Match
Mod
Mut
Pub
Return
SelfKw
SelfTy
Static
Struct
Super
True
Type
Use
While
LCurly
RCurly
LBrack
RBrack
LParen
RParen
Amp
AmpAmp
AmpEq
Arrow
At
Backslash
Bang
BangBang
BangEq
Bar
BarBar
BarEq
Colon
ColonColon
Comma
Dot
DotDot
DotDotEq
Eq
EqEq
FatArrow
Grave
Gt
GtEq
GtGt
GtGtEq
Hash
HashBang
Lt
LtEq
LtLt
LtLtEq
Minus
MinusEq
Plus
PlusEq
Question
Rem
RemEq
Semi
Slash
SlashEq
Star
StarEq
Tilde
Xor
XorEq
XorXor
Trait Implementations§
impl Copy for TokenKind
impl Eq for TokenKind
impl StructuralPartialEq for TokenKind
Auto Trait Implementations§
impl Freeze for TokenKind
impl RefUnwindSafe for TokenKind
impl Send for TokenKind
impl Sync for TokenKind
impl Unpin for TokenKind
impl UnwindSafe for TokenKind
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