[][src]Enum wasmi::RuntimeValue

pub enum RuntimeValue {

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.



Value of 32-bit signed or unsigned integer.


Value of 64-bit signed or unsigned integer.


Value of 32-bit IEEE 754-2008 floating point number.


Value of 64-bit IEEE 754-2008 floating point number.


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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Downcast for T where
    T: Any

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.