#[non_exhaustive]pub enum Token {
Show 36 variants
Ident(String),
Str(String),
Number(f64),
Eq,
NotEq,
WordMatch,
PrefixMatch,
StartsWith,
EndsWith,
Contains,
Lt,
Gt,
Lte,
Gte,
LBracket,
RBracket,
LParen,
RParen,
Comma,
Dot,
Star,
Hash,
Colon,
DoubleColon,
Plus,
Tilde,
Bang,
Semicolon,
Null,
True,
False,
Not,
Is,
And,
Or,
Custom(String),
}Expand description
Lexical token produced by tokenize().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ident(String)
Identifier: unquoted name (method, async, count).
Str(String)
Quoted string literal.
Number(f64)
Numeric literal (parsed to f64).
Eq
=
NotEq
!=
WordMatch
~=
PrefixMatch
|=
StartsWith
^=
EndsWith
$=
Contains
*=
Lt
<
Gt
>
Lte
<=
Gte
>=
LBracket
[
RBracket
]
LParen
(
RParen
)
Comma
,
Dot
.
Star
* (standalone, not *=)
Hash
#
Colon
:
DoubleColon
::
Plus
+ (standalone, not inside an operator)
Tilde
~ (standalone, not ~=)
Bang
! (standalone, not !=)
Semicolon
;
Null
Keyword null
True
Keyword true
False
Keyword false
Not
Keyword not
Is
Keyword is
And
Keyword and
Or
Keyword or
Custom(String)
Consumer-defined token from Tokenizer::op() or Tokenizer::keyword().
Trait Implementations§
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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