Trait wasmi::FromRuntimeValue [] [src]

pub trait FromRuntimeValue where
    Self: Sized
{ fn from_runtime_value(val: RuntimeValue) -> Option<Self>; }

Trait for creating value from a RuntimeValue.

Typically each implementation can create a value from the specific type. For example, values of type bool or u32 are both represented by I32 and f64 values are represented by F64.

Required Methods

Create a value of type Self from a given RuntimeValue.

Returns None if the RuntimeValue is of type different than expected by the conversion in question.

Implementations on Foreign Types

impl FromRuntimeValue for bool
[src]

This conversion assumes that boolean values are represented by I32 type.

impl FromRuntimeValue for i32
[src]

impl FromRuntimeValue for i64
[src]

impl FromRuntimeValue for f32
[src]

impl FromRuntimeValue for f64
[src]

impl FromRuntimeValue for u32
[src]

impl FromRuntimeValue for u64
[src]

Implementors