pub struct Grouping {
pub action: GroupingAction,
pub labels: Vec<String>,
}Expand description
Grouping clause for aggregation expressions.
Specifies how to group results when aggregating across time series.
§Example
use rusty_promql_parser::parser::aggregation::{Grouping, GroupingAction};
let g = Grouping {
action: GroupingAction::By,
labels: vec!["job".to_string(), "instance".to_string()],
};
assert_eq!(g.to_string(), "by (job, instance)");Fields§
§action: GroupingActionThe grouping action (by or without).
labels: Vec<String>The label names to group by/without.
Trait Implementations§
impl Eq for Grouping
impl StructuralPartialEq for Grouping
Auto Trait Implementations§
impl Freeze for Grouping
impl RefUnwindSafe for Grouping
impl Send for Grouping
impl Sync for Grouping
impl Unpin for Grouping
impl UnwindSafe for Grouping
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