pub enum Expr {
Bin(BinOp, Box<Expr>, Box<Expr>),
Var(Symbol, TyId),
Row(Box<[(Symbol, Expr)]>, TyId),
Lit(AlgebraicValue, TyId),
Field(Box<Expr>, usize, TyId),
Input(TyId),
}Expand description
A typed scalar expression
Variants§
Bin(BinOp, Box<Expr>, Box<Expr>)
A binary expression
Var(Symbol, TyId)
A variable reference
Row(Box<[(Symbol, Expr)]>, TyId)
A row or projection expression
Lit(AlgebraicValue, TyId)
A typed literal expression
Field(Box<Expr>, usize, TyId)
A field expression
Input(TyId)
The input parameter to a relop
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn ty<'a>(&self, ctx: &'a TyCtx) -> Result<TypeWithCtx<'a>, InvalidTypeId>
pub fn ty<'a>(&self, ctx: &'a TyCtx) -> Result<TypeWithCtx<'a>, InvalidTypeId>
The type of this expression
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more