Enum prometheus_parser::Expression [−][src]
pub enum Expression {
Float(f64),
String(String),
Selector(Selector),
Group(Group),
Function(Function),
Operator(Operator),
}
Expand description
A root expression node.
These are all valid root expression types.
Variants
Float(f64)
Tuple Fields
0: f64
A single scalar float
String(String)
Tuple Fields
0: String
A single scalar string.
Prometheus’ docs claim strings aren’t currently implemented, but they’re valid as function arguments.
Selector(Selector)
Tuple Fields
0: Selector
A metric selector
Group(Group)
Tuple Fields
0: Group
A grouped expression wrapped in parentheses
Function(Function)
Tuple Fields
0: Function
A function call
Operator(Operator)
Tuple Fields
0: Operator
A binary operator expression
Implementations
Wraps this Expression in a Group, consuming this Expression but returning an owned Group.
Determines a predicted ReturnValue
for this Expression. A ReturnValue
includes a predicted data type and a set of label operations that may
affect which labels are returned.
If this Expression is a Float, returns its value. Otherwise, returns None.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
Blanket Implementations
Mutably borrows from an owned value. Read more