Enum wasmi::RuntimeValue [−][src]
Runtime representation of a value.
Wasm code manipulate values of the four basic value types: integers and floating-point (IEEE 754-2008) data of 32 or 64 bit width each, respectively.
There is no distinction between signed and unsigned integer types. Instead, integers are interpreted by respective operations as either unsigned or signed in two’s complement representation.
Variants
I32(i32)
Value of 32-bit signed or unsigned integer.
I64(i64)
Value of 64-bit signed or unsigned integer.
F32(F32)
Value of 32-bit IEEE 754-2008 floating point number.
F64(F64)
Value of 64-bit IEEE 754-2008 floating point number.
Methods
impl RuntimeValue
[src]
impl RuntimeValue
pub fn default(value_type: ValueType) -> Self
[src]
pub fn default(value_type: ValueType) -> Self
Creates new default value of given type.
pub fn decode_f32(val: u32) -> Self
[src]
pub fn decode_f32(val: u32) -> Self
Creates new value by interpreting passed u32 as f32.
pub fn decode_f64(val: u64) -> Self
[src]
pub fn decode_f64(val: u64) -> Self
Creates new value by interpreting passed u64 as f64.
pub fn value_type(&self) -> ValueType
[src]
pub fn value_type(&self) -> ValueType
Get variable type for this value.
pub fn try_into<T: FromRuntimeValue>(self) -> Option<T>
[src]
pub fn try_into<T: FromRuntimeValue>(self) -> Option<T>
Returns T
if this particular RuntimeValue
contains
appropriate type.
See FromRuntimeValue
for details.
Trait Implementations
impl Copy for RuntimeValue
[src]
impl Copy for RuntimeValue
impl Clone for RuntimeValue
[src]
impl Clone for RuntimeValue
fn clone(&self) -> RuntimeValue
[src]
fn clone(&self) -> RuntimeValue
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for RuntimeValue
[src]
impl Debug for RuntimeValue
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for RuntimeValue
[src]
impl PartialEq for RuntimeValue
fn eq(&self, other: &RuntimeValue) -> bool
[src]
fn eq(&self, other: &RuntimeValue) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RuntimeValue) -> bool
[src]
fn ne(&self, other: &RuntimeValue) -> bool
This method tests for !=
.
impl From<i8> for RuntimeValue
[src]
impl From<i8> for RuntimeValue
impl From<i16> for RuntimeValue
[src]
impl From<i16> for RuntimeValue
impl From<i32> for RuntimeValue
[src]
impl From<i32> for RuntimeValue
impl From<i64> for RuntimeValue
[src]
impl From<i64> for RuntimeValue
impl From<u8> for RuntimeValue
[src]
impl From<u8> for RuntimeValue
impl From<u16> for RuntimeValue
[src]
impl From<u16> for RuntimeValue
impl From<u32> for RuntimeValue
[src]
impl From<u32> for RuntimeValue
impl From<u64> for RuntimeValue
[src]
impl From<u64> for RuntimeValue
impl From<F32> for RuntimeValue
[src]
impl From<F32> for RuntimeValue
impl From<F64> for RuntimeValue
[src]
impl From<F64> for RuntimeValue
Auto Trait Implementations
impl Send for RuntimeValue
impl Send for RuntimeValue
impl Sync for RuntimeValue
impl Sync for RuntimeValue