Enum cranelift_isle::sema::Expr
source · [−]pub enum Expr {
Term(TypeId, TermId, Vec<Expr>),
Var(TypeId, VarId),
ConstInt(TypeId, i64),
ConstPrim(TypeId, Sym),
Let {
ty: TypeId,
bindings: Vec<(VarId, TypeId, Box<Expr>)>,
body: Box<Expr>,
},
}
Expand description
A right-hand side expression of some rule.
Variants
Term(TypeId, TermId, Vec<Expr>)
Invoke this term constructor with the given arguments.
Var(TypeId, VarId)
Get the value of a variable that was bound in the left-hand side.
ConstInt(TypeId, i64)
Get a constant integer.
ConstPrim(TypeId, Sym)
Get a constant primitive.
Let
Fields
ty: TypeId
The type of the result of this let expression.
Evaluate the nested expressions and bind their results to the given variables, then evaluate the body expression.
Implementations
Trait Implementations
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more