pub enum WasmValue {
I32(i32),
I64(i64),
F32(f32),
F64(f64),
V128(u128),
RefExtern(ExternAddr),
RefFunc(FuncAddr),
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.
V128(u128)
RefExtern(ExternAddr)
RefFunc(FuncAddr)
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§
impl Copy for WasmValue
impl StructuralPartialEq for WasmValue
Auto Trait Implementations§
impl Freeze for WasmValue
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.