Struct wasmi_core::UntypedValue
source · #[repr(transparent)]pub struct UntypedValue { /* private fields */ }
Expand description
An untyped Value
.
Provides a dense and simple interface to all functional Wasm operations.
Implementations§
source§impl UntypedValue
impl UntypedValue
sourcepub fn to_bits(self) -> u64
pub fn to_bits(self) -> u64
Returns the underlying bits of the UntypedValue
.
source§impl UntypedValue
impl UntypedValue
sourcepub fn i32_popcnt(self) -> Self
pub fn i32_popcnt(self) -> Self
Execute i32.popcnt
Wasm operation.
sourcepub fn i64_popcnt(self) -> Self
pub fn i64_popcnt(self) -> Self
Execute i64.popcnt
Wasm operation.
sourcepub fn f32_nearest(self) -> Self
pub fn f32_nearest(self) -> Self
Execute f32.nearest
Wasm operation.
sourcepub fn f32_copysign(self, other: Self) -> Self
pub fn f32_copysign(self, other: Self) -> Self
Execute f32.copysign
Wasm operation.
sourcepub fn f64_nearest(self) -> Self
pub fn f64_nearest(self) -> Self
Execute f64.nearest
Wasm operation.
sourcepub fn f64_copysign(self, other: Self) -> Self
pub fn f64_copysign(self, other: Self) -> Self
Execute f64.copysign
Wasm operation.
sourcepub fn i32_wrap_i64(self) -> Self
pub fn i32_wrap_i64(self) -> Self
Execute i32.wrap_i64
Wasm operation.
sourcepub fn i32_trunc_f32_s(self) -> Result<Self, TrapCode>
pub fn i32_trunc_f32_s(self) -> Result<Self, TrapCode>
Execute i32.trunc_f32_s
Wasm operation.
sourcepub fn i32_trunc_f32_u(self) -> Result<Self, TrapCode>
pub fn i32_trunc_f32_u(self) -> Result<Self, TrapCode>
Execute i32.trunc_f32_u
Wasm operation.
sourcepub fn i32_trunc_f64_s(self) -> Result<Self, TrapCode>
pub fn i32_trunc_f64_s(self) -> Result<Self, TrapCode>
Execute i32.trunc_f64_s
Wasm operation.
sourcepub fn i32_trunc_f64_u(self) -> Result<Self, TrapCode>
pub fn i32_trunc_f64_u(self) -> Result<Self, TrapCode>
Execute i32.trunc_f64_u
Wasm operation.
sourcepub fn i64_extend_i32_s(self) -> Self
pub fn i64_extend_i32_s(self) -> Self
Execute i64.extend_i32_s
Wasm operation.
sourcepub fn i64_extend_i32_u(self) -> Self
pub fn i64_extend_i32_u(self) -> Self
Execute i64.extend_i32_u
Wasm operation.
sourcepub fn i64_trunc_f32_s(self) -> Result<Self, TrapCode>
pub fn i64_trunc_f32_s(self) -> Result<Self, TrapCode>
Execute i64.trunc_f32_s
Wasm operation.
sourcepub fn i64_trunc_f32_u(self) -> Result<Self, TrapCode>
pub fn i64_trunc_f32_u(self) -> Result<Self, TrapCode>
Execute i64.trunc_f32_u
Wasm operation.
sourcepub fn i64_trunc_f64_s(self) -> Result<Self, TrapCode>
pub fn i64_trunc_f64_s(self) -> Result<Self, TrapCode>
Execute i64.trunc_f64_s
Wasm operation.
sourcepub fn i64_trunc_f64_u(self) -> Result<Self, TrapCode>
pub fn i64_trunc_f64_u(self) -> Result<Self, TrapCode>
Execute i64.trunc_f64_u
Wasm operation.
sourcepub fn f32_convert_i32_s(self) -> Self
pub fn f32_convert_i32_s(self) -> Self
Execute f32.convert_i32_s
Wasm operation.
sourcepub fn f32_convert_i32_u(self) -> Self
pub fn f32_convert_i32_u(self) -> Self
Execute f32.convert_i32_u
Wasm operation.
sourcepub fn f32_convert_i64_s(self) -> Self
pub fn f32_convert_i64_s(self) -> Self
Execute f32.convert_i64_s
Wasm operation.
sourcepub fn f32_convert_i64_u(self) -> Self
pub fn f32_convert_i64_u(self) -> Self
Execute f32.convert_i64_u
Wasm operation.
sourcepub fn f32_demote_f64(self) -> Self
pub fn f32_demote_f64(self) -> Self
Execute f32.demote_f64
Wasm operation.
sourcepub fn f64_convert_i32_s(self) -> Self
pub fn f64_convert_i32_s(self) -> Self
Execute f64.convert_i32_s
Wasm operation.
sourcepub fn f64_convert_i32_u(self) -> Self
pub fn f64_convert_i32_u(self) -> Self
Execute f64.convert_i32_u
Wasm operation.
sourcepub fn f64_convert_i64_s(self) -> Self
pub fn f64_convert_i64_s(self) -> Self
Execute f64.convert_i64_s
Wasm operation.
sourcepub fn f64_convert_i64_u(self) -> Self
pub fn f64_convert_i64_u(self) -> Self
Execute f64.convert_i64_u
Wasm operation.
sourcepub fn f64_promote_f32(self) -> Self
pub fn f64_promote_f32(self) -> Self
Execute f64.promote_f32
Wasm operation.
sourcepub fn i32_extend8_s(self) -> Self
pub fn i32_extend8_s(self) -> Self
Execute i32.extend8_s
Wasm operation.
sourcepub fn i32_extend16_s(self) -> Self
pub fn i32_extend16_s(self) -> Self
Execute i32.extend16_s
Wasm operation.
sourcepub fn i64_extend8_s(self) -> Self
pub fn i64_extend8_s(self) -> Self
Execute i64.extend8_s
Wasm operation.
sourcepub fn i64_extend16_s(self) -> Self
pub fn i64_extend16_s(self) -> Self
Execute i64.extend16_s
Wasm operation.
sourcepub fn i64_extend32_s(self) -> Self
pub fn i64_extend32_s(self) -> Self
Execute i64.extend32_s
Wasm operation.
sourcepub fn i32_trunc_sat_f32_s(self) -> Self
pub fn i32_trunc_sat_f32_s(self) -> Self
Execute i32.trunc_sat_f32_s
Wasm operation.
sourcepub fn i32_trunc_sat_f32_u(self) -> Self
pub fn i32_trunc_sat_f32_u(self) -> Self
Execute i32.trunc_sat_f32_u
Wasm operation.
sourcepub fn i32_trunc_sat_f64_s(self) -> Self
pub fn i32_trunc_sat_f64_s(self) -> Self
Execute i32.trunc_sat_f64_s
Wasm operation.
sourcepub fn i32_trunc_sat_f64_u(self) -> Self
pub fn i32_trunc_sat_f64_u(self) -> Self
Execute i32.trunc_sat_f64_u
Wasm operation.
sourcepub fn i64_trunc_sat_f32_s(self) -> Self
pub fn i64_trunc_sat_f32_s(self) -> Self
Execute i64.trunc_sat_f32_s
Wasm operation.
sourcepub fn i64_trunc_sat_f32_u(self) -> Self
pub fn i64_trunc_sat_f32_u(self) -> Self
Execute i64.trunc_sat_f32_u
Wasm operation.
sourcepub fn i64_trunc_sat_f64_s(self) -> Self
pub fn i64_trunc_sat_f64_s(self) -> Self
Execute i64.trunc_sat_f64_s
Wasm operation.
sourcepub fn i64_trunc_sat_f64_u(self) -> Self
pub fn i64_trunc_sat_f64_u(self) -> Self
Execute i64.trunc_sat_f64_u
Wasm operation.
source§impl UntypedValue
impl UntypedValue
sourcepub fn decode_slice<T>(slice: &[Self]) -> Result<T, UntypedError>where
T: DecodeUntypedSlice,
pub fn decode_slice<T>(slice: &[Self]) -> Result<T, UntypedError>where T: DecodeUntypedSlice,
Decodes the slice of UntypedValue
as a value of type T
.
Note
T
can either be a single type or a tuple of types depending
on the length of the slice
.
Errors
If the tuple length of T
and the length of slice
does not match.
sourcepub fn encode_slice<T>(slice: &mut [Self], input: T) -> Result<(), UntypedError>where
T: EncodeUntypedSlice,
pub fn encode_slice<T>(slice: &mut [Self], input: T) -> Result<(), UntypedError>where T: EncodeUntypedSlice,
Encodes the slice of UntypedValue
from the given value of type T
.
Note
T
can either be a single type or a tuple of types depending
on the length of the slice
.
Errors
If the tuple length of T
and the length of slice
does not match.
Trait Implementations§
source§impl Clone for UntypedValue
impl Clone for UntypedValue
source§fn clone(&self) -> UntypedValue
fn clone(&self) -> UntypedValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UntypedValue
impl Debug for UntypedValue
source§impl Default for UntypedValue
impl Default for UntypedValue
source§fn default() -> UntypedValue
fn default() -> UntypedValue
source§impl From<F32> for UntypedValue
impl From<F32> for UntypedValue
source§impl From<F64> for UntypedValue
impl From<F64> for UntypedValue
source§impl From<UntypedValue> for F32
impl From<UntypedValue> for F32
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for F64
impl From<UntypedValue> for F64
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for bool
impl From<UntypedValue> for bool
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for f32
impl From<UntypedValue> for f32
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for f64
impl From<UntypedValue> for f64
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for i16
impl From<UntypedValue> for i16
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for i32
impl From<UntypedValue> for i32
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for i64
impl From<UntypedValue> for i64
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for i8
impl From<UntypedValue> for i8
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for u16
impl From<UntypedValue> for u16
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for u32
impl From<UntypedValue> for u32
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for u64
impl From<UntypedValue> for u64
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<UntypedValue> for u8
impl From<UntypedValue> for u8
source§fn from(untyped: UntypedValue) -> Self
fn from(untyped: UntypedValue) -> Self
source§impl From<Value> for UntypedValue
impl From<Value> for UntypedValue
source§impl From<bool> for UntypedValue
impl From<bool> for UntypedValue
source§impl From<f32> for UntypedValue
impl From<f32> for UntypedValue
source§impl From<f64> for UntypedValue
impl From<f64> for UntypedValue
source§impl From<i16> for UntypedValue
impl From<i16> for UntypedValue
source§impl From<i32> for UntypedValue
impl From<i32> for UntypedValue
source§impl From<i64> for UntypedValue
impl From<i64> for UntypedValue
source§impl From<i8> for UntypedValue
impl From<i8> for UntypedValue
source§impl From<u16> for UntypedValue
impl From<u16> for UntypedValue
source§impl From<u32> for UntypedValue
impl From<u32> for UntypedValue
source§impl From<u64> for UntypedValue
impl From<u64> for UntypedValue
source§impl From<u8> for UntypedValue
impl From<u8> for UntypedValue
source§impl Ord for UntypedValue
impl Ord for UntypedValue
source§fn cmp(&self, other: &UntypedValue) -> Ordering
fn cmp(&self, other: &UntypedValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<UntypedValue> for UntypedValue
impl PartialEq<UntypedValue> for UntypedValue
source§fn eq(&self, other: &UntypedValue) -> bool
fn eq(&self, other: &UntypedValue) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<UntypedValue> for UntypedValue
impl PartialOrd<UntypedValue> for UntypedValue
source§fn partial_cmp(&self, other: &UntypedValue) -> Option<Ordering>
fn partial_cmp(&self, other: &UntypedValue) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for UntypedValue
impl Eq for UntypedValue
impl StructuralEq for UntypedValue
impl StructuralPartialEq for UntypedValue
Auto Trait Implementations§
impl RefUnwindSafe for UntypedValue
impl Send for UntypedValue
impl Sync for UntypedValue
impl Unpin for UntypedValue
impl UnwindSafe for UntypedValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T1> DecodeUntypedSlice for T1where
T1: From<UntypedValue>,
impl<T1> DecodeUntypedSlice for T1where T1: From<UntypedValue>,
source§fn decode_untyped_slice(results: &[UntypedValue]) -> Result<T1, UntypedError>
fn decode_untyped_slice(results: &[UntypedValue]) -> Result<T1, UntypedError>
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.