Struct UntypedVal

Source
pub struct UntypedVal { /* private fields */ }
Expand description

An untyped value.

Provides a dense and simple interface to all functional Wasm operations.

Implementations§

Source§

impl UntypedVal

Source

pub fn to_bits(self) -> u64

Returns the underlying bits of the UntypedVal.

Source§

impl UntypedVal

Source

pub fn i32_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i32.load Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn f32_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the f32.load Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn f64_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the f64.load Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i32_load8_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i32.load8_s Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i32_load8_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i32.load8_u Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i32_load16_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i32.load16_s Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i32_load16_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i32.load16_u Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load8_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load8_s Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load8_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load8_u Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load16_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load16_s Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load16_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load16_u Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load32_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load32_s Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i64_load32_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>

Executes the i64.load32_u Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset loads out of bounds from memory.
Source

pub fn i32_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i32.store Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i64_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i64.store Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn f32_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the f32.store Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn f64_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the f64.store Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i32_store8( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i32.store8 Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i32_store16( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i32.store16 Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i64_store8( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i64.store8 Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i64_store16( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i64.store16 Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i64_store32( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>

Executes the i64.store32 Wasm operation.

§Errors
  • If address + offset overflows.
  • If address + offset stores out of bounds from memory.
Source

pub fn i32_add(self, rhs: UntypedVal) -> UntypedVal

Execute i32.add Wasm operation.

Source

pub fn i64_add(self, rhs: UntypedVal) -> UntypedVal

Execute i64.add Wasm operation.

Source

pub fn i32_sub(self, rhs: UntypedVal) -> UntypedVal

Execute i32.sub Wasm operation.

Source

pub fn i64_sub(self, rhs: UntypedVal) -> UntypedVal

Execute i64.sub Wasm operation.

Source

pub fn i32_mul(self, rhs: UntypedVal) -> UntypedVal

Execute i32.mul Wasm operation.

Source

pub fn i64_mul(self, rhs: UntypedVal) -> UntypedVal

Execute i64.mul Wasm operation.

Source

pub fn i32_div_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i32.div_s Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i64_div_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i64.div_s Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i32_div_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i32.div_u Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i64_div_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i64.div_u Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i32_rem_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i32.rem_s Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i64_rem_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i64.rem_s Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i32_rem_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i32.rem_u Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i64_rem_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>

Execute i64.rem_u Wasm operation.

§Errors
  • If rhs is equal to zero.
  • If the operation result overflows.
Source

pub fn i32_and(self, rhs: UntypedVal) -> UntypedVal

Execute i32.and Wasm operation.

Source

pub fn i64_and(self, rhs: UntypedVal) -> UntypedVal

Execute i64.and Wasm operation.

Source

pub fn i32_or(self, rhs: UntypedVal) -> UntypedVal

Execute i32.or Wasm operation.

Source

pub fn i64_or(self, rhs: UntypedVal) -> UntypedVal

Execute i64.or Wasm operation.

Source

pub fn i32_xor(self, rhs: UntypedVal) -> UntypedVal

Execute i32.xor Wasm operation.

Source

pub fn i64_xor(self, rhs: UntypedVal) -> UntypedVal

Execute i64.xor Wasm operation.

Source

pub fn i32_shl(self, rhs: UntypedVal) -> UntypedVal

Execute i32.shl Wasm operation.

Source

pub fn i64_shl(self, rhs: UntypedVal) -> UntypedVal

Execute i64.shl Wasm operation.

Source

pub fn i32_shr_s(self, rhs: UntypedVal) -> UntypedVal

Execute i32.shr_s Wasm operation.

Source

pub fn i64_shr_s(self, rhs: UntypedVal) -> UntypedVal

Execute i64.shr_s Wasm operation.

Source

pub fn i32_shr_u(self, rhs: UntypedVal) -> UntypedVal

Execute i32.shr_u Wasm operation.

Source

pub fn i64_shr_u(self, rhs: UntypedVal) -> UntypedVal

Execute i64.shr_u Wasm operation.

Source

pub fn i32_clz(self) -> UntypedVal

Execute i32.clz Wasm operation.

Source

pub fn i64_clz(self) -> UntypedVal

Execute i64.clz Wasm operation.

Source

pub fn i32_ctz(self) -> UntypedVal

Execute i32.ctz Wasm operation.

Source

pub fn i64_ctz(self) -> UntypedVal

Execute i64.ctz Wasm operation.

Source

pub fn i32_popcnt(self) -> UntypedVal

Execute i32.popcnt Wasm operation.

Source

pub fn i64_popcnt(self) -> UntypedVal

Execute i64.popcnt Wasm operation.

Source

pub fn i32_rotl(self, rhs: UntypedVal) -> UntypedVal

Execute i32.rotl Wasm operation.

Source

pub fn i64_rotl(self, rhs: UntypedVal) -> UntypedVal

Execute i64.rotl Wasm operation.

Source

pub fn i32_rotr(self, rhs: UntypedVal) -> UntypedVal

Execute i32.rotr Wasm operation.

Source

pub fn i64_rotr(self, rhs: UntypedVal) -> UntypedVal

Execute i64.rotr Wasm operation.

Source

pub fn i32_eqz(self) -> UntypedVal

Execute i32.eqz Wasm operation.

Source

pub fn i64_eqz(self) -> UntypedVal

Execute i64.eqz Wasm operation.

Source

pub fn i32_eq(self, rhs: UntypedVal) -> UntypedVal

Execute i32.eq Wasm operation.

Source

pub fn i64_eq(self, rhs: UntypedVal) -> UntypedVal

Execute i64.eq Wasm operation.

Source

pub fn f32_eq(self, rhs: UntypedVal) -> UntypedVal

Execute f32.eq Wasm operation.

Source

pub fn f64_eq(self, rhs: UntypedVal) -> UntypedVal

Execute f64.eq Wasm operation.

Source

pub fn i32_ne(self, rhs: UntypedVal) -> UntypedVal

Execute i32.ne Wasm operation.

Source

pub fn i64_ne(self, rhs: UntypedVal) -> UntypedVal

Execute i64.ne Wasm operation.

Source

pub fn f32_ne(self, rhs: UntypedVal) -> UntypedVal

Execute f32.ne Wasm operation.

Source

pub fn f64_ne(self, rhs: UntypedVal) -> UntypedVal

Execute f64.ne Wasm operation.

Source

pub fn i32_lt_s(self, rhs: UntypedVal) -> UntypedVal

Execute i32.lt_s Wasm operation.

Source

pub fn i64_lt_s(self, rhs: UntypedVal) -> UntypedVal

Execute i64.lt_s Wasm operation.

Source

pub fn i32_lt_u(self, rhs: UntypedVal) -> UntypedVal

Execute i32.lt_u Wasm operation.

Source

pub fn i64_lt_u(self, rhs: UntypedVal) -> UntypedVal

Execute i64.lt_u Wasm operation.

Source

pub fn f32_lt(self, rhs: UntypedVal) -> UntypedVal

Execute f32.lt Wasm operation.

Source

pub fn f64_lt(self, rhs: UntypedVal) -> UntypedVal

Execute f64.lt Wasm operation.

Source

pub fn i32_le_s(self, rhs: UntypedVal) -> UntypedVal

Execute i32.le_s Wasm operation.

Source

pub fn i64_le_s(self, rhs: UntypedVal) -> UntypedVal

Execute i64.le_s Wasm operation.

Source

pub fn i32_le_u(self, rhs: UntypedVal) -> UntypedVal

Execute i32.le_u Wasm operation.

Source

pub fn i64_le_u(self, rhs: UntypedVal) -> UntypedVal

Execute i64.le_u Wasm operation.

Source

pub fn f32_le(self, rhs: UntypedVal) -> UntypedVal

Execute f32.le Wasm operation.

Source

pub fn f64_le(self, rhs: UntypedVal) -> UntypedVal

Execute f64.le Wasm operation.

Source

pub fn i32_gt_s(self, rhs: UntypedVal) -> UntypedVal

Execute i32.gt_s Wasm operation.

Source

pub fn i64_gt_s(self, rhs: UntypedVal) -> UntypedVal

Execute i64.gt_s Wasm operation.

Source

pub fn i32_gt_u(self, rhs: UntypedVal) -> UntypedVal

Execute i32.gt_u Wasm operation.

Source

pub fn i64_gt_u(self, rhs: UntypedVal) -> UntypedVal

Execute i64.gt_u Wasm operation.

Source

pub fn f32_gt(self, rhs: UntypedVal) -> UntypedVal

Execute f32.gt Wasm operation.

Source

pub fn f64_gt(self, rhs: UntypedVal) -> UntypedVal

Execute f64.gt Wasm operation.

Source

pub fn i32_ge_s(self, rhs: UntypedVal) -> UntypedVal

Execute i32.ge_s Wasm operation.

Source

pub fn i64_ge_s(self, rhs: UntypedVal) -> UntypedVal

Execute i64.ge_s Wasm operation.

Source

pub fn i32_ge_u(self, rhs: UntypedVal) -> UntypedVal

Execute i32.ge_u Wasm operation.

Source

pub fn i64_ge_u(self, rhs: UntypedVal) -> UntypedVal

Execute i64.ge_u Wasm operation.

Source

pub fn f32_ge(self, rhs: UntypedVal) -> UntypedVal

Execute f32.ge Wasm operation.

Source

pub fn f64_ge(self, rhs: UntypedVal) -> UntypedVal

Execute f64.ge Wasm operation.

Source

pub fn f32_abs(self) -> UntypedVal

Execute f32.abs Wasm operation.

Source

pub fn f32_neg(self) -> UntypedVal

Execute f32.neg Wasm operation.

Source

pub fn f32_ceil(self) -> UntypedVal

Execute f32.ceil Wasm operation.

Source

pub fn f32_floor(self) -> UntypedVal

Execute f32.floor Wasm operation.

Source

pub fn f32_trunc(self) -> UntypedVal

Execute f32.trunc Wasm operation.

Source

pub fn f32_nearest(self) -> UntypedVal

Execute f32.nearest Wasm operation.

Source

pub fn f32_sqrt(self) -> UntypedVal

Execute f32.sqrt Wasm operation.

Source

pub fn f32_min(self, other: UntypedVal) -> UntypedVal

Execute f32.min Wasm operation.

Source

pub fn f32_max(self, other: UntypedVal) -> UntypedVal

Execute f32.max Wasm operation.

Source

pub fn f32_copysign(self, other: UntypedVal) -> UntypedVal

Execute f32.copysign Wasm operation.

Source

pub fn f64_abs(self) -> UntypedVal

Execute f64.abs Wasm operation.

Source

pub fn f64_neg(self) -> UntypedVal

Execute f64.neg Wasm operation.

Source

pub fn f64_ceil(self) -> UntypedVal

Execute f64.ceil Wasm operation.

Source

pub fn f64_floor(self) -> UntypedVal

Execute f64.floor Wasm operation.

Source

pub fn f64_trunc(self) -> UntypedVal

Execute f64.trunc Wasm operation.

Source

pub fn f64_nearest(self) -> UntypedVal

Execute f64.nearest Wasm operation.

Source

pub fn f64_sqrt(self) -> UntypedVal

Execute f64.sqrt Wasm operation.

Source

pub fn f32_add(self, rhs: UntypedVal) -> UntypedVal

Execute f32.add Wasm operation.

Source

pub fn f64_add(self, rhs: UntypedVal) -> UntypedVal

Execute f64.add Wasm operation.

Source

pub fn f32_sub(self, rhs: UntypedVal) -> UntypedVal

Execute f32.sub Wasm operation.

Source

pub fn f64_sub(self, rhs: UntypedVal) -> UntypedVal

Execute f64.sub Wasm operation.

Source

pub fn f32_mul(self, rhs: UntypedVal) -> UntypedVal

Execute f32.mul Wasm operation.

Source

pub fn f64_mul(self, rhs: UntypedVal) -> UntypedVal

Execute f64.mul Wasm operation.

Source

pub fn f32_div(self, rhs: UntypedVal) -> UntypedVal

Execute f32.div Wasm operation.

Source

pub fn f64_div(self, rhs: UntypedVal) -> UntypedVal

Execute f64.div Wasm operation.

Source

pub fn f64_min(self, other: UntypedVal) -> UntypedVal

Execute f64.min Wasm operation.

Source

pub fn f64_max(self, other: UntypedVal) -> UntypedVal

Execute f64.max Wasm operation.

Source

pub fn f64_copysign(self, other: UntypedVal) -> UntypedVal

Execute f64.copysign Wasm operation.

Source

pub fn i32_wrap_i64(self) -> UntypedVal

Execute i32.wrap_i64 Wasm operation.

Source

pub fn i32_trunc_f32_s(self) -> Result<UntypedVal, TrapCode>

Execute i32.trunc_f32_s Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i32_trunc_f32_u(self) -> Result<UntypedVal, TrapCode>

Execute i32.trunc_f32_u Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i32_trunc_f64_s(self) -> Result<UntypedVal, TrapCode>

Execute i32.trunc_f64_s Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i32_trunc_f64_u(self) -> Result<UntypedVal, TrapCode>

Execute i32.trunc_f64_u Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i64_extend_i32_s(self) -> UntypedVal

Execute i64.extend_i32_s Wasm operation.

Source

pub fn i64_extend_i32_u(self) -> UntypedVal

Execute i64.extend_i32_u Wasm operation.

Source

pub fn i64_trunc_f32_s(self) -> Result<UntypedVal, TrapCode>

Execute i64.trunc_f32_s Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i64_trunc_f32_u(self) -> Result<UntypedVal, TrapCode>

Execute i64.trunc_f32_u Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i64_trunc_f64_s(self) -> Result<UntypedVal, TrapCode>

Execute i64.trunc_f64_s Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn i64_trunc_f64_u(self) -> Result<UntypedVal, TrapCode>

Execute i64.trunc_f64_u Wasm operation.

§Errors
  • If self is NaN (not a number).
  • If self is positive or negative infinity.
  • If the integer value of self is out of bounds of the target type.

Read more about the failure cases in the WebAssembly specification.

Source

pub fn f32_convert_i32_s(self) -> UntypedVal

Execute f32.convert_i32_s Wasm operation.

Source

pub fn f32_convert_i32_u(self) -> UntypedVal

Execute f32.convert_i32_u Wasm operation.

Source

pub fn f32_convert_i64_s(self) -> UntypedVal

Execute f32.convert_i64_s Wasm operation.

Source

pub fn f32_convert_i64_u(self) -> UntypedVal

Execute f32.convert_i64_u Wasm operation.

Source

pub fn f32_demote_f64(self) -> UntypedVal

Execute f32.demote_f64 Wasm operation.

Source

pub fn f64_convert_i32_s(self) -> UntypedVal

Execute f64.convert_i32_s Wasm operation.

Source

pub fn f64_convert_i32_u(self) -> UntypedVal

Execute f64.convert_i32_u Wasm operation.

Source

pub fn f64_convert_i64_s(self) -> UntypedVal

Execute f64.convert_i64_s Wasm operation.

Source

pub fn f64_convert_i64_u(self) -> UntypedVal

Execute f64.convert_i64_u Wasm operation.

Source

pub fn f64_promote_f32(self) -> UntypedVal

Execute f64.promote_f32 Wasm operation.

Source

pub fn i32_extend8_s(self) -> UntypedVal

Execute i32.extend8_s Wasm operation.

Source

pub fn i32_extend16_s(self) -> UntypedVal

Execute i32.extend16_s Wasm operation.

Source

pub fn i64_extend8_s(self) -> UntypedVal

Execute i64.extend8_s Wasm operation.

Source

pub fn i64_extend16_s(self) -> UntypedVal

Execute i64.extend16_s Wasm operation.

Source

pub fn i64_extend32_s(self) -> UntypedVal

Execute i64.extend32_s Wasm operation.

Source

pub fn i32_trunc_sat_f32_s(self) -> UntypedVal

Execute i32.trunc_sat_f32_s Wasm operation.

Source

pub fn i32_trunc_sat_f32_u(self) -> UntypedVal

Execute i32.trunc_sat_f32_u Wasm operation.

Source

pub fn i32_trunc_sat_f64_s(self) -> UntypedVal

Execute i32.trunc_sat_f64_s Wasm operation.

Source

pub fn i32_trunc_sat_f64_u(self) -> UntypedVal

Execute i32.trunc_sat_f64_u Wasm operation.

Source

pub fn i64_trunc_sat_f32_s(self) -> UntypedVal

Execute i64.trunc_sat_f32_s Wasm operation.

Source

pub fn i64_trunc_sat_f32_u(self) -> UntypedVal

Execute i64.trunc_sat_f32_u Wasm operation.

Source

pub fn i64_trunc_sat_f64_s(self) -> UntypedVal

Execute i64.trunc_sat_f64_s Wasm operation.

Source

pub fn i64_trunc_sat_f64_u(self) -> UntypedVal

Execute i64.trunc_sat_f64_u Wasm operation.

Source§

impl UntypedVal

Source

pub fn decode_slice<T>(slice: &[UntypedVal]) -> Result<T, UntypedError>

Decodes the slice of UntypedVal 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.

Source

pub fn encode_slice<T>( slice: &mut [UntypedVal], input: T, ) -> Result<(), UntypedError>

Encodes the slice of UntypedVal 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 UntypedVal

Source§

fn clone(&self) -> UntypedVal

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UntypedVal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for UntypedVal

Source§

fn default() -> UntypedVal

Returns the “default value” for a type. Read more
Source§

impl From<ExternRef> for UntypedVal

Source§

fn from(externref: ExternRef) -> Self

Converts to this type from the input type.
Source§

impl From<F32> for UntypedVal

Source§

fn from(value: F32) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<F64> for UntypedVal

Source§

fn from(value: F64) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<FuncRef> for UntypedVal

Source§

fn from(funcref: FuncRef) -> Self

Converts to this type from the input type.
Source§

impl From<UntypedVal> for ExternRef

Source§

fn from(untyped: UntypedVal) -> Self

Converts to this type from the input type.
Source§

impl From<UntypedVal> for F32

Source§

fn from(untyped: UntypedVal) -> F32

Converts to this type from the input type.
Source§

impl From<UntypedVal> for F64

Source§

fn from(untyped: UntypedVal) -> F64

Converts to this type from the input type.
Source§

impl From<UntypedVal> for FuncRef

Source§

fn from(untyped: UntypedVal) -> Self

Converts to this type from the input type.
Source§

impl From<Val> for UntypedVal

Source§

fn from(value: Val) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for UntypedVal

Source§

fn from(value: bool) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<f32> for UntypedVal

Source§

fn from(value: f32) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<f64> for UntypedVal

Source§

fn from(value: f64) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<i16> for UntypedVal

Source§

fn from(value: i16) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<i32> for UntypedVal

Source§

fn from(value: i32) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<i64> for UntypedVal

Source§

fn from(value: i64) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<i8> for UntypedVal

Source§

fn from(value: i8) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<u16> for UntypedVal

Source§

fn from(value: u16) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<u32> for UntypedVal

Source§

fn from(value: u32) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<u64> for UntypedVal

Source§

fn from(value: u64) -> UntypedVal

Converts to this type from the input type.
Source§

impl From<u8> for UntypedVal

Source§

fn from(value: u8) -> UntypedVal

Converts to this type from the input type.
Source§

impl Ord for UntypedVal

Source§

fn cmp(&self, other: &UntypedVal) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for UntypedVal

Source§

fn eq(&self, other: &UntypedVal) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for UntypedVal

Source§

fn partial_cmp(&self, other: &UntypedVal) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for UntypedVal

Source§

impl Eq for UntypedVal

Source§

impl StructuralPartialEq for UntypedVal

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T1> DecodeUntypedSlice for T1
where T1: From<UntypedVal>,

Source§

fn decode_untyped_slice(results: &[UntypedVal]) -> Result<T1, UntypedError>

Decodes the slice of UntypedVal as a value of type Self. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

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

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T1> EncodeUntypedSlice for T1
where T1: Into<UntypedVal>,

Source§

fn encode_untyped_slice( self, results: &mut [UntypedVal], ) -> Result<(), UntypedError>

Encodes the slice of UntypedVal from the given value of type Self. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.