[][src]Enum wasmi::RuntimeValue

pub enum RuntimeValue {
    I32(i32),
    I64(i64),
    F32(F32),
    F64(F64),
}

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.

Implementations

impl RuntimeValue[src]

pub fn default(value_type: ValueType) -> Self[src]

Creates new default value of given type.

pub fn decode_f32(val: u32) -> Self[src]

Creates new value by interpreting passed u32 as f32.

pub fn decode_f64(val: u64) -> Self[src]

Creates new value by interpreting passed u64 as f64.

pub fn value_type(&self) -> ValueType[src]

Get variable type for this value.

pub fn try_into<T: FromRuntimeValue>(self) -> Option<T>[src]

Returns T if this particular RuntimeValue contains appropriate type.

See FromRuntimeValue for details.

Trait Implementations

impl Clone for RuntimeValue[src]

impl Copy for RuntimeValue[src]

impl Debug for RuntimeValue[src]

impl From<F32> for RuntimeValue[src]

impl From<F64> for RuntimeValue[src]

impl From<i16> for RuntimeValue[src]

impl From<i32> for RuntimeValue[src]

impl From<i64> for RuntimeValue[src]

impl From<i8> for RuntimeValue[src]

impl From<u16> for RuntimeValue[src]

impl From<u32> for RuntimeValue[src]

impl From<u64> for RuntimeValue[src]

impl From<u8> for RuntimeValue[src]

impl PartialEq<RuntimeValue> for RuntimeValue[src]

impl StructuralPartialEq for RuntimeValue[src]

Auto Trait Implementations

impl RefUnwindSafe for RuntimeValue

impl Send for RuntimeValue

impl Sync for RuntimeValue

impl Unpin for RuntimeValue

impl UnwindSafe for RuntimeValue

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.