#[non_exhaustive]pub enum Token {
Show 43 variants
String(String),
Number(f64),
Duration(Duration),
Bytes(u64),
Ident(String),
Flag(String),
Eq,
Neq,
Re,
Nre,
PipeExact,
PipeRegex,
Pipe,
CmpEq,
Gt,
Gte,
Lt,
Lte,
Add,
Sub,
Mul,
Div,
Mod,
Pow,
LBrace,
RBrace,
LParen,
RParen,
LBracket,
RBracket,
Comma,
By,
Without,
On,
Ignoring,
GroupLeft,
GroupRight,
Unwrap,
Offset,
Bool,
And,
Or,
Unless,
}Expand description
A single LogQL token.
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.
String(String)
Double-quoted (escaped) or backtick-quoted (raw) string.
Number(f64)
Numeric literal, including floats and scientific notation.
Duration(Duration)
Duration literal such as 5m, 1h30m, or 1.5h.
Bytes(u64)
Bytes literal such as 20KB, 5MB, or 1GiB, in bytes.
Ident(String)
Identifier: label names, function names, parser stage names.
Flag(String)
A parser-stage flag such as --strict or --keep-empty (stored
without the leading dashes).
Eq
=
Neq
!= (label matcher or line filter, depending on position)
Re
=~
Nre
!~ (label matcher or line filter, depending on position)
PipeExact
|=
PipeRegex
|~
Pipe
|
CmpEq
==
Gt
>
Gte
>=
Lt
<
Lte
<=
Add
+
Sub
-
Mul
*
Div
/
Mod
%
Pow
^
LBrace
{
RBrace
}
LParen
(
RParen
)
LBracket
[
RBracket
]
Comma
,
By
by
Without
without
On
on
Ignoring
ignoring
GroupLeft
group_left
GroupRight
group_right
Unwrap
unwrap
Offset
offset
Bool
bool
And
and
Or
or
Unless
unless
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