[−][src]Enum wasmi::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.
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 RuntimeValuepub fn default(value_type: ValueType) -> Self[src]
pub fn default(value_type: ValueType) -> SelfCreates new default value of given type.
pub fn decode_f32(val: u32) -> Self[src]
pub fn decode_f32(val: u32) -> SelfCreates new value by interpreting passed u32 as f32.
pub fn decode_f64(val: u64) -> Self[src]
pub fn decode_f64(val: u64) -> SelfCreates new value by interpreting passed u64 as f64.
pub fn value_type(&self) -> ValueType[src]
pub fn value_type(&self) -> ValueTypeGet 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 From<i8> for RuntimeValue[src]
impl From<i8> for RuntimeValueimpl From<i16> for RuntimeValue[src]
impl From<i16> for RuntimeValueimpl From<i32> for RuntimeValue[src]
impl From<i32> for RuntimeValueimpl From<i64> for RuntimeValue[src]
impl From<i64> for RuntimeValueimpl From<u8> for RuntimeValue[src]
impl From<u8> for RuntimeValueimpl From<u16> for RuntimeValue[src]
impl From<u16> for RuntimeValueimpl From<u32> for RuntimeValue[src]
impl From<u32> for RuntimeValueimpl From<u64> for RuntimeValue[src]
impl From<u64> for RuntimeValueimpl From<F32> for RuntimeValue[src]
impl From<F32> for RuntimeValueimpl From<F64> for RuntimeValue[src]
impl From<F64> for RuntimeValueimpl Copy for RuntimeValue[src]
impl Copy for RuntimeValueimpl Clone for RuntimeValue[src]
impl Clone for RuntimeValuefn clone(&self) -> RuntimeValue[src]
fn clone(&self) -> RuntimeValueReturns 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 PartialEq<RuntimeValue> for RuntimeValue[src]
impl PartialEq<RuntimeValue> for RuntimeValuefn eq(&self, other: &RuntimeValue) -> bool[src]
fn eq(&self, other: &RuntimeValue) -> boolThis 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) -> boolThis method tests for !=.
impl Debug for RuntimeValue[src]
impl Debug for RuntimeValueAuto Trait Implementations
impl Send for RuntimeValue
impl Send for RuntimeValueimpl Sync for RuntimeValue
impl Sync for RuntimeValueBlanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>,