pub struct AggregateExpr {
pub op: TokenType,
pub expr: Box<Expr>,
pub param: Option<Box<Expr>>,
pub modifier: Option<LabelModifier>,
}
Expand description
Grammar:
<aggr-op> [without|by (<label list>)] ([parameter,] <vector expression>)
<aggr-op>([parameter,] <vector expression>) [without|by (<label list>)]
parameter is only required for count_values
, quantile
, topk
and bottomk
.
Fields§
§op: TokenType
The used aggregation operation.
expr: Box<Expr>
The Vector expression over which is aggregated.
param: Option<Box<Expr>>
Parameter used by some aggregators.
modifier: Option<LabelModifier>
modifier is optional for some aggregation operators, like sum.
Trait Implementations§
Source§impl Clone for AggregateExpr
impl Clone for AggregateExpr
Source§fn clone(&self) -> AggregateExpr
fn clone(&self) -> AggregateExpr
Returns a duplicate of the value. Read more
1.0.0 · 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 AggregateExpr
impl Debug for AggregateExpr
Source§impl Display for AggregateExpr
impl Display for AggregateExpr
Source§impl PartialEq for AggregateExpr
impl PartialEq for AggregateExpr
Source§impl Prettier for AggregateExpr
impl Prettier for AggregateExpr
Source§fn format(&self, level: usize, max: usize) -> String
fn format(&self, level: usize, max: usize) -> String
override format if expr needs to be split into multiple lines
Source§fn pretty(&self, level: usize, max: usize) -> String
fn pretty(&self, level: usize, max: usize) -> String
max param is short for max_characters_per_line.
Source§fn needs_split(&self, max: usize) -> bool
fn needs_split(&self, max: usize) -> bool
override needs_split to return false, in order not to split multiple lines
impl Eq for AggregateExpr
impl StructuralPartialEq for AggregateExpr
Auto Trait Implementations§
impl Freeze for AggregateExpr
impl !RefUnwindSafe for AggregateExpr
impl Send for AggregateExpr
impl Sync for AggregateExpr
impl Unpin for AggregateExpr
impl !UnwindSafe for AggregateExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.