pub enum TokenType {
BooleanFalse,
BooleanTrue,
BracketClose,
BracketOpen,
Colon,
Comma,
CurlyClose,
CurlyOpen,
Invalid,
Null,
Number,
String,
}Expand description
Define our own TokenType so Clone can be defined on it.
This can be removed when json_tools::TokenType impls Clone.
Variants§
BooleanFalse
false.
BooleanTrue
true.
BracketClose
].
BracketOpen
[.
Colon
:.
Comma
,.
CurlyClose
}.
CurlyOpen
{.
Invalid
The type of the token could not be identified. Should be removed if this lexer is ever to be feature complete.
Null
null.
Number
A Number, like 1.1234 or 123 or -0.0 or -1 or .0 or ..
String
A JSON string, like "foo".
Trait Implementations§
Source§impl Ord for TokenType
impl Ord for TokenType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for TokenType
impl PartialOrd for TokenType
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 UnsafeUnpin for TokenType
impl UnwindSafe for TokenType
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