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 impl’s 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
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 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