pub enum Kind {
Show 113 variants
Eof,
Comment,
MultilineComment(bool),
Error,
Shebang(LitSource),
Close(Delimiter),
Open(Delimiter),
Ident(LitSource),
Label(LitSource),
Byte(CopySource<u8>),
ByteStr(StrSource),
Char(CopySource<char>),
Number(NumberSource),
Str(StrSource),
Abstract,
AlignOf,
Amp,
AmpAmp,
AmpEq,
Arrow,
As,
Async,
At,
Await,
Bang,
BangEq,
Become,
Break,
Caret,
CaretEq,
Colon,
ColonColon,
Comma,
Const,
Continue,
Crate,
Dash,
DashEq,
Default,
Div,
Do,
Dollar,
Dot,
DotDot,
DotDotEq,
Else,
Enum,
Eq,
EqEq,
Extern,
False,
Final,
Fn,
For,
Gt,
GtEq,
GtGt,
GtGtEq,
If,
Impl,
In,
Is,
Let,
Loop,
Lt,
LtEq,
LtLt,
LtLtEq,
Macro,
Match,
Mod,
Move,
Mut,
Not,
OffsetOf,
Override,
Perc,
PercEq,
Pipe,
PipeEq,
PipePipe,
Plus,
PlusEq,
Pound,
Priv,
Proc,
Pub,
Pure,
QuestionMark,
Ref,
Return,
Rocket,
Select,
SelfType,
SelfValue,
SemiColon,
SizeOf,
SlashEq,
Star,
StarEq,
Static,
Struct,
Super,
Tilde,
True,
TypeOf,
Underscore,
Unsafe,
Use,
Virtual,
While,
Yield,
Whitespace,
}
Expand description
The kind of the token.
Variants§
Eof
En end-of-file marker.
Comment
A single-line comment.
MultilineComment(bool)
A multiline comment where the boolean indicates if it’s been terminated correctly.
Error
En error marker.
Shebang(LitSource)
The special initial line of a file shebang.
Close(Delimiter)
A close delimiter: )
, }
, or ]
.
Open(Delimiter)
An open delimiter: (
, {
, or [
.
Ident(LitSource)
An identifier.
Label(LitSource)
A label, like 'loop
.
Byte(CopySource<u8>)
A byte literal.
ByteStr(StrSource)
A byte string literal, including escape sequences. Like b"hello\nworld"
.
Char(CopySource<char>)
A characer literal.
Number(NumberSource)
A number literal, like 42
or 3.14
or 0xff
.
Str(StrSource)
A string literal, including escape sequences. Like "hello\nworld"
.
Abstract
The abstract
keyword.
AlignOf
The alignof
keyword.
Amp
&
.
AmpAmp
&&
.
AmpEq
&=
.
Arrow
->
.
As
The as
keyword.
Async
The async
keyword.
At
@
.
Await
The await
keyword.
Bang
!
.
BangEq
!=
.
Become
The become
keyword.
Break
The break
keyword.
Caret
^
.
CaretEq
^=
.
Colon
:
.
ColonColon
::
.
Comma
,
.
Const
The const
keyword.
Continue
The continue
keyword.
Crate
The crate
keyword.
Dash
-
.
DashEq
-=
.
Default
The default
keyword.
Div
/
.
Do
The do
keyword.
Dollar
$
.
Dot
.
.
DotDot
..
.
DotDotEq
..=
.
Else
The else
keyword.
Enum
The enum
keyword.
Eq
=
.
EqEq
==
.
Extern
The extern
keyword.
False
The false
keyword.
Final
The final
keyword.
Fn
The fn
keyword.
For
The for
keyword.
Gt
>
.
GtEq
>=
.
GtGt
>>
.
GtGtEq
>>=
.
If
The if
keyword.
Impl
The impl
keyword.
In
The in
keyword.
Is
The is
keyword.
Let
The let
keyword.
Loop
The loop
keyword.
Lt
<
.
LtEq
<=
.
LtLt
<<
.
LtLtEq
<<=
.
Macro
The macro
keyword.
Match
The match
keyword.
Mod
The mod
keyword.
Move
The move
keyword.
Mut
The mut
keyword.
Not
The not
keyword.
OffsetOf
The offsetof
keyword.
Override
The override
keyword.
Perc
%
.
PercEq
%=
.
Pipe
|
.
PipeEq
|=`.
PipePipe
||
.
Plus
+
.
PlusEq
+=
.
Pound
#
.
Priv
The priv
keyword.
Proc
The proc
keyword.
Pub
The pub
keyword.
Pure
The pure
keyword.
QuestionMark
?
.
Ref
The ref
keyword.
Return
The return
keyword.
Rocket
=>
.
Select
The select
keyword.
SelfType
The Self
keyword.
SelfValue
The self
keyword.
SemiColon
;
.
SizeOf
The sizeof
keyword.
SlashEq
/=
.
Star
*
.
StarEq
*=
.
Static
The static
keyword.
Struct
The struct
keyword.
Super
The super
keyword.
Tilde
~
.
True
The true
keyword.
TypeOf
The typeof
keyword.
Underscore
_
.
Unsafe
The unsafe
keyword.
Use
The use
keyword.
Virtual
The virtual
keyword.
While
The while
keyword.
Yield
The yield
keyword.
Whitespace
Kind used for whitespace.
Trait Implementations§
source§impl Ord for Kind
impl Ord for Kind
source§impl PartialEq for Kind
impl PartialEq for Kind
source§impl PartialOrd for Kind
impl PartialOrd for Kind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl ToTokens for Kind
impl ToTokens for Kind
source§fn to_tokens(
&self,
context: &mut MacroContext<'_, '_, '_>,
stream: &mut TokenStream
) -> Result<(), Error>
fn to_tokens( &self, context: &mut MacroContext<'_, '_, '_>, stream: &mut TokenStream ) -> Result<(), Error>
impl Copy for Kind
impl Eq for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnwindSafe for Kind
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.