Enum tinywasm_types::WasmValue
source · pub enum WasmValue {
I32(i32),
I64(i64),
F32(f32),
F64(f64),
RefNull(ValType),
}
Expand description
A WebAssembly value.
See https://webassembly.github.io/spec/core/syntax/types.html#value-types
Variants§
I32(i32)
A 32-bit integer.
I64(i64)
A 64-bit integer.
F32(f32)
A 32-bit float.
F64(f64)
A 64-bit float.
RefNull(ValType)
Implementations§
source§impl WasmValue
impl WasmValue
pub fn const_instr(&self) -> ConstInstruction
sourcepub fn default_for(ty: ValType) -> Self
pub fn default_for(ty: ValType) -> Self
Get the default value for a given type.
pub fn eq_loose(&self, other: &Self) -> bool
Trait Implementations§
source§impl PartialEq for WasmValue
impl PartialEq for WasmValue
impl Copy for WasmValue
impl StructuralPartialEq for WasmValue
Auto Trait Implementations§
impl RefUnwindSafe for WasmValue
impl Send for WasmValue
impl Sync for WasmValue
impl Unpin for WasmValue
impl UnwindSafe for WasmValue
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