pub struct Aggregation {
pub op: AggregationOp,
pub labels: Vec<String>,
pub span: Option<Span>,
}
Expand description
A function aggregation clause.
Not all functions can be aggregated, but this library currently does not attempt to validate this sort of usage.
Fields§
§op: AggregationOp
§labels: Vec<String>
§span: Option<Span>
Implementations§
Source§impl Aggregation
impl Aggregation
pub fn new(op: AggregationOp) -> Self
pub fn by() -> Self
pub fn without() -> Self
Sourcepub fn op(self, op: AggregationOp) -> Self
pub fn op(self, op: AggregationOp) -> Self
Replaces this Aggregation’s operator
Sourcepub fn labels(self, labels: &[&str]) -> Self
pub fn labels(self, labels: &[&str]) -> Self
Replaces this Aggregation’s labels with the given set
Sourcepub fn clear_labels(self) -> Self
pub fn clear_labels(self) -> Self
Clear this Matching’s set of labels
pub fn span<S: Into<Span>>(self, span: S) -> Self
Trait Implementations§
Source§impl Clone for Aggregation
impl Clone for Aggregation
Source§fn clone(&self) -> Aggregation
fn clone(&self) -> Aggregation
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 Aggregation
impl Debug for Aggregation
Source§impl Display for Aggregation
impl Display for Aggregation
Source§impl PartialEq for Aggregation
impl PartialEq for Aggregation
impl Eq for Aggregation
impl StructuralPartialEq for Aggregation
Auto Trait Implementations§
impl Freeze for Aggregation
impl RefUnwindSafe for Aggregation
impl Send for Aggregation
impl Sync for Aggregation
impl Unpin for Aggregation
impl UnwindSafe for Aggregation
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