[−][src]Struct prometheus_parser::Operator
A binary operator expression with left- and right-hand sides.
Operator expressions may optionally have a matching clause for more specific vector matching behavior.
Note that operator precedence is accounted for at parse-time, so the resulting tree (i.e. lhs/rhs expressions) should already account for un-grouped expressions at the same syntax level.
Fields
kind: OperatorKindThis Operator's function (multiply, divide, power, equals, etc)
lhs: BExpressionThe left-hand-side expression
rhs: BExpressionThe right-hand-side expression
matching: Option<Matching>An optional matching clause for this operator (on(...), ignoring(...))
span: Option<Span>Methods
impl Operator[src]
pub fn new(kind: OperatorKind, lhs: Expression, rhs: Expression) -> Self[src]
pub fn matching(self, matching: Matching) -> Self[src]
Sets or replaces this Operator's Matching clause
pub fn clear_matching(self) -> Self[src]
Clears this Operator's Matching clause, if any
pub fn span<S: Into<Span>>(self, span: S) -> Self[src]
pub fn wrap(self) -> Expression[src]
Wraps this Operator in an Expression
pub fn return_value(&self) -> ReturnValue[src]
Trait Implementations
impl Clone for Operator[src]
impl Debug for Operator[src]
impl Display for Operator[src]
impl PartialEq<Operator> for Operator[src]
impl StructuralPartialEq for Operator[src]
Auto Trait Implementations
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnwindSafe for Operator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,