[][src]Enum promql::Node

pub enum Node {
    Operator {
        x: Box<Node>,
        op: Op,
        y: Box<Node>,
    },
    Vector(Vector),
    Scalar(f32),
    String(String),
    Function {
        name: String,
        args: Vec<Node>,
        aggregation: Option<AggregationMod>,
    },
    Negation(Box<Node>),
}

AST node.

Variants

Operator

Operator: a + ignoring (foo) b

Fields of Operator

x: Box<Node>

First operand.

op: Op

Operator itself.

y: Box<Node>

Second operand.

Vector(Vector)

Time series vector.

Scalar(f32)

Floating point number.

String(String)

String literal.

Function

Function call or aggregation operator.

Fields of Function

name: Stringargs: Vec<Node>aggregation: Option<AggregationMod>
Negation(Box<Node>)

Unary negation, e.g. -b in a + -b

Trait Implementations

impl Debug for Node[src]

impl PartialEq<Node> for Node[src]

impl StructuralPartialEq for Node[src]

Auto Trait Implementations

impl RefUnwindSafe for Node

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

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, 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.