pub enum TokenType {
Show 29 variants
Unit,
Bool,
U8,
U16,
U32,
U64,
U128,
Usize,
I8,
I16,
I32,
I64,
I128,
Isize,
F32,
F64,
Char,
Bytes,
Str,
Seq,
EndSeq,
Tuple,
EndTuple,
Struct,
Field,
EndStruct,
Enum,
Variant,
EndEnum,
}Expand description
The type of a token, excluding any value or metadata.
This is used by sinks to declare expected tokens.
Variants§
Unit
Bool
U8
U16
U32
U64
U128
Usize
I8
I16
I32
I64
I128
Isize
F32
F64
Char
Bytes
Str
Seq
EndSeq
Tuple
EndTuple
Struct
Field
EndStruct
Enum
Variant
EndEnum
Trait Implementations§
Source§impl TryFrom<u64> for TokenType
Converts an integer representation of the token type into
TokenType. Returns Err(()) if the value is invalid.
impl TryFrom<u64> for TokenType
Converts an integer representation of the token type into
TokenType. Returns Err(()) if the value is invalid.
impl Copy for TokenType
impl Eq for TokenType
impl StructuralPartialEq for TokenType
Auto Trait Implementations§
impl Freeze for TokenType
impl RefUnwindSafe for TokenType
impl Send for TokenType
impl Sync for TokenType
impl Unpin for TokenType
impl UnwindSafe for TokenType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)