pub enum Expr {
Literal(Value),
Ref(MeasureId, DimensionSpec),
UnaryOp(UnaryOp, Box<Expr>),
BinaryOp(BinaryOp, Box<Expr>, Box<Expr>),
Call(FuncId, Vec<Expr>),
Category(CategoryId),
}Expand description
A formula expression. Broadcasting over shared dimensions is implicit at the language level and made explicit by the compiler (Phase 1).
Variants§
Literal(Value)
Ref(MeasureId, DimensionSpec)
Reference another measure, with an optional dimension projection.
UnaryOp(UnaryOp, Box<Expr>)
BinaryOp(BinaryOp, Box<Expr>, Box<Expr>)
Call(FuncId, Vec<Expr>)
Category(CategoryId)
A category named as a function argument (POSITION(Time),
PREV(x, Time)); not a value on its own.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more