[][src]Struct prometheus_parser::Aggregation

pub struct Aggregation {
    pub op: AggregationOp,
    pub labels: Vec<String>,
    pub span: Option<Span>,
}

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: AggregationOplabels: Vec<String>span: Option<Span>

Methods

impl Aggregation[src]

pub fn new(op: AggregationOp) -> Self[src]

pub fn by() -> Self[src]

pub fn without() -> Self[src]

pub fn op(self, op: AggregationOp) -> Self[src]

Replaces this Aggregation's operator

pub fn label<S: Into<String>>(self, label: S) -> Self[src]

Adds a label key to this Aggregation

pub fn labels(self, labels: &[&str]) -> Self[src]

Replaces this Aggregation's labels with the given set

pub fn clear_labels(self) -> Self[src]

Clear this Matching's set of labels

pub fn span<S: Into<Span>>(self, span: S) -> Self[src]

Trait Implementations

impl Clone for Aggregation[src]

impl Debug for Aggregation[src]

impl Display for Aggregation[src]

impl Eq for Aggregation[src]

impl PartialEq<Aggregation> for Aggregation[src]

impl StructuralEq for Aggregation[src]

impl StructuralPartialEq for Aggregation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.