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.
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]
fn clone(&self) -> RuntimeValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn eq(&self, other: &RuntimeValue) -> bool
[src]
fn ne(&self, other: &RuntimeValue) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,