pub enum TokenType<'a> {
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
Colon,
Comma,
String(Cow<'a, str>),
Number(JsonNumber),
Boolean(bool),
Null,
}Expand description
The specific type of a Token.
This represents the smallest meaningful units of JSON grammar.
Variants§
LeftBrace
{
RightBrace
}
LeftBracket
[
RightBracket
]
Colon
:
Comma
,
String(Cow<'a, str>)
A string, e.g., "hello"
Number(JsonNumber)
A number, e.g., 123.4
Boolean(bool)
A boolean, true or false
Null
The null literal
Trait Implementations§
impl<'a> StructuralPartialEq for TokenType<'a>
Auto Trait Implementations§
impl<'a> Freeze for TokenType<'a>
impl<'a> RefUnwindSafe for TokenType<'a>
impl<'a> Send for TokenType<'a>
impl<'a> Sync for TokenType<'a>
impl<'a> Unpin for TokenType<'a>
impl<'a> UnwindSafe for TokenType<'a>
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