[][src]Struct prometheus_parser::Label

pub struct Label {
    pub key: String,
    pub op: LabelOp,
    pub value: String,
    pub span: Option<Span>,
}

A label matcher in a selector

Fields

key: Stringop: LabelOpvalue: Stringspan: Option<Span>

Methods

impl Label[src]

pub fn new<S: Into<String>>(op: LabelOp, key: S, value: S) -> Self[src]

pub fn equal<S: Into<String>>(key: S, value: S) -> Self[src]

pub fn not_equal<S: Into<String>>(key: S, value: S) -> Self[src]

pub fn regex_equal<S: Into<String>>(key: S, value: S) -> Self[src]

pub fn regex_notequal<S: Into<String>>(key: S, value: S) -> Self[src]

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

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

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

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

Trait Implementations

impl Clone for Label[src]

impl Debug for Label[src]

impl Display for Label[src]

impl Eq for Label[src]

impl PartialEq<Label> for Label[src]

impl StructuralEq for Label[src]

impl StructuralPartialEq for Label[src]

Auto Trait Implementations

impl RefUnwindSafe for Label

impl Send for Label

impl Sync for Label

impl Unpin for Label

impl UnwindSafe for Label

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.