pub enum ConstExpr {
Value(Value),
Global(GlobalId),
RefNull(RefType),
RefFunc(FunctionId),
Extended(Vec<ConstOp>),
}Expand description
A constant which is produced in WebAssembly, typically used in global initializers or element/data offsets.
Variants§
Value(Value)
An immediate constant value
Global(GlobalId)
A constant value referenced by the global specified
RefNull(RefType)
A null reference
RefFunc(FunctionId)
A function initializer
Extended(Vec<ConstOp>)
Extended constant expression (sequence of instructions)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConstExpr
impl RefUnwindSafe for ConstExpr
impl Send for ConstExpr
impl Sync for ConstExpr
impl Unpin for ConstExpr
impl UnwindSafe for ConstExpr
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