#[non_exhaustive]pub enum MetricQuery {
Range(Box<RangeAggregation>),
Vector(Box<VectorAggregation>),
Binary(Box<BinaryExpr>),
Literal(f64),
VectorLiteral(f64),
LabelReplace(Box<LabelReplace>),
}Expand description
A parsed LogQL metric query.
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.
Range(Box<RangeAggregation>)
A range aggregation over a log selector, e.g. rate({a="b"}[5m]).
Vector(Box<VectorAggregation>)
A vector aggregation over an inner metric query, e.g.
sum by (level) (rate(...)).
Binary(Box<BinaryExpr>)
A binary operation between two metric queries or scalars.
Literal(f64)
A scalar literal (e.g. the 2 in rate(...) * 2).
VectorLiteral(f64)
vector(<scalar>) — a scalar promoted to an instant vector, used
for fallbacks like ... or vector(0).
LabelReplace(Box<LabelReplace>)
label_replace(v, dst, replacement, src, regex) — rewrite a label
from a regex capture of another label.
Trait Implementations§
Source§impl Clone for MetricQuery
impl Clone for MetricQuery
Source§fn clone(&self) -> MetricQuery
fn clone(&self) -> MetricQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricQuery
impl Debug for MetricQuery
Source§impl PartialEq for MetricQuery
impl PartialEq for MetricQuery
impl StructuralPartialEq for MetricQuery
Auto Trait Implementations§
impl Freeze for MetricQuery
impl RefUnwindSafe for MetricQuery
impl Send for MetricQuery
impl Sync for MetricQuery
impl Unpin for MetricQuery
impl UnsafeUnpin for MetricQuery
impl UnwindSafe for MetricQuery
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