[][src]Struct prometheus_parser::MatchingGroup

pub struct MatchingGroup {
    pub op: MatchingGroupOp,
    pub labels: Vec<String>,
    pub span: Option<Span>,
}

A matching clause's nested grouping clause

Fields

op: MatchingGroupOp

The matching group's operator type (left or right)

labels: Vec<String>

A list of labels to copy to the opposite side of the group operator, i.e. group_left(foo) copies the label foo from the right hand side

span: Option<Span>

Methods

impl MatchingGroup[src]

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

pub fn left() -> Self[src]

Creates a new MatchingGroup with the Left op

pub fn right() -> Self[src]

Creates a new MatchingGroup with the Right op

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

Replaces this Matching's operator

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

Adds a label key to this MatchingGroup

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

Replaces this MatchingGroup's labels with the given set

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

Clears this MatchingGroup's set of labels

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

Trait Implementations

impl Clone for MatchingGroup[src]

impl Debug for MatchingGroup[src]

impl Display for MatchingGroup[src]

impl Eq for MatchingGroup[src]

impl PartialEq<MatchingGroup> for MatchingGroup[src]

impl StructuralEq for MatchingGroup[src]

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