[][src]Struct prometheus_parser::ReturnValue

pub struct ReturnValue {
    pub kind: ReturnKind,
    pub label_ops: Vec<LabelSetOpTuple>,
}

A predicted return value from an expression

Fields

kind: ReturnKindlabel_ops: Vec<LabelSetOpTuple>

A stack of operations applied to original source labels

Methods

impl ReturnValue[src]

pub fn unknown<S>(message: S, expression: Expression) -> Self where
    S: Into<String>, 
[src]

pub fn label_op(&mut self, op: LabelSetOpTuple) -> &mut Self[src]

pub fn passthrough(&self, input_labels: &[&str]) -> HashSet<String>[src]

Given a number of input label keys, returns a set of labels expected to be present on all returned time series

Note that more labels may be returned than were provided in the input set; expressions that explicitly select for or group on labels will

pub fn drops(&self, label: &str) -> Option<&LabelSetOpTuple>[src]

Determines the operation (plus expression and span) that caused the given label to be dropped. If the label is never dropped, returns None.

This also accounts for expressions that drop a label and re-add it later, for instance with an aggregation clause.

Trait Implementations

impl Clone for ReturnValue[src]

impl Debug for ReturnValue[src]

impl PartialEq<ReturnValue> for ReturnValue[src]

impl StructuralPartialEq for ReturnValue[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, 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.