Enum wasmtime::Val [−][src]
pub enum Val {
I32(i32),
I64(i64),
F32(u32),
F64(u64),
V128(u128),
FuncRef(Option<Func>),
ExternRef(Option<ExternRef>),
}Expand description
Possible runtime values that a WebAssembly module can either consume or produce.
Variants
I32(i32)A 32-bit integer
Tuple Fields of I32
0: i32I64(i64)A 64-bit integer
Tuple Fields of I64
0: i64F32(u32)A 32-bit float.
Note that the raw bits of the float are stored here, and you can use
f32::from_bits to create an f32 value.
Tuple Fields of F32
0: u32F64(u64)A 64-bit float.
Note that the raw bits of the float are stored here, and you can use
f64::from_bits to create an f64 value.
Tuple Fields of F64
0: u64V128(u128)A 128-bit number
Tuple Fields of V128
0: u128A first-class reference to a WebAssembly function.
FuncRef(None) is the null function reference, created by ref.null func in Wasm.
An externref value which can hold opaque data to the Wasm instance
itself.
ExternRef(None) is the null external reference, created by ref.null extern in Wasm.
Implementations
Attempt to access the underlying value of this Val, returning
None if it is not the correct type.
Returns the underlying value of this Val, panicking if it’s the
wrong type.
Panics
Panics if self is not of the right type.
Attempt to access the underlying value of this Val, returning
None if it is not the correct type.
Returns the underlying value of this Val, panicking if it’s the
wrong type.
Panics
Panics if self is not of the right type.
Attempt to access the underlying value of this Val, returning
None if it is not the correct type.
Returns the underlying value of this Val, panicking if it’s the
wrong type.
Panics
Panics if self is not of the right type.
Attempt to access the underlying value of this Val, returning
None if it is not the correct type.
Returns the underlying value of this Val, panicking if it’s the
wrong type.
Panics
Panics if self is not of the right type.
Attempt to access the underlying value of this Val, returning
None if it is not the correct type.
Returns the underlying value of this Val, panicking if it’s the
wrong type.
Panics
Panics if self is not of the right type.
Attempt to access the underlying value of this Val, returning
None if it is not the correct type.
Returns the underlying value of this Val, panicking if it’s the
wrong type.
Panics
Panics if self is not of the right type.
Attempt to access the underlying externref value of this Val.
If this is not an externref, then None is returned.
If this is a null externref, then Some(None) is returned.
If this is a non-null externref, then Some(Some(..)) is returned.
Returns the underlying externref value of this Val, panicking if it’s the
wrong type.
If this is a null externref, then None is returned.
If this is a non-null externref, then Some(..) is returned.
Panics
Panics if self is not a (nullable) externref.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Val
impl !UnwindSafe for Val
Blanket Implementations
Mutably borrows from an owned value. Read more