Struct prometheus_parser::Operator [−][src]
pub struct Operator {
pub kind: OperatorKind,
pub lhs: BExpression,
pub rhs: BExpression,
pub matching: Option<Matching>,
pub span: Option<Span>,
}
Expand description
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: OperatorKind
This Operator’s function (multiply, divide, power, equals, etc)
lhs: BExpression
The left-hand-side expression
rhs: BExpression
The right-hand-side expression
matching: Option<Matching>
An optional matching clause for this operator (on(...)
, ignoring(...)
)
span: Option<Span>
Implementations
Sets or replaces this Operator’s Matching clause
Clears this Operator’s Matching clause, if any
Wraps this Operator in an Expression
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Operator
impl UnwindSafe for Operator
Blanket Implementations
Mutably borrows from an owned value. Read more