pub enum WasmValue {
I32(i32),
I64(i64),
F32(f32),
F64(f64),
RefExtern(u32),
RefFunc(u32),
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.
RefExtern(u32)
RefFunc(u32)
RefNull(ValType)
Implementations§
source§impl WasmValue
impl WasmValue
pub fn const_instr(&self) -> ConstInstruction
sourcepub fn default_for(ty: ValType) -> WasmValue
pub fn default_for(ty: ValType) -> WasmValue
Get the default value for a given type.
pub fn eq_loose(&self, other: &WasmValue) -> bool
Trait Implementations§
impl Copy 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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§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.