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
impl UntypedVal
Sourcepub fn to_bits(self) -> u64
pub fn to_bits(self) -> u64
Returns the underlying bits of the UntypedVal.
Source§impl UntypedVal
impl UntypedVal
Sourcepub fn i32_load(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i32_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i32.load Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn f32_load(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn f32_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the f32.load Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn f64_load(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn f64_load( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the f64.load Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i32_load8_s(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i32_load8_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i32.load8_s Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i32_load8_u(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i32_load8_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i32.load8_u Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i32_load16_s(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i32_load16_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i32.load16_s Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i32_load16_u(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i32_load16_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i32.load16_u Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load8_s(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load8_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load8_s Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load8_u(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load8_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load8_u Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load16_s(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load16_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load16_s Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load16_u(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load16_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load16_u Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load32_s(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load32_s( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load32_s Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i64_load32_u(
memory: &[u8],
address: UntypedVal,
offset: u32,
) -> Result<UntypedVal, TrapCode>
pub fn i64_load32_u( memory: &[u8], address: UntypedVal, offset: u32, ) -> Result<UntypedVal, TrapCode>
Executes the i64.load32_u Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetloads out of bounds frommemory.
Sourcepub fn i32_store(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i32_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i32.store Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i64_store(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i64_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i64.store Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn f32_store(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn f32_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the f32.store Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn f64_store(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn f64_store( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the f64.store Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i32_store8(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i32_store8( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i32.store8 Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i32_store16(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i32_store16( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i32.store16 Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i64_store8(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i64_store8( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i64.store8 Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i64_store16(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i64_store16( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i64.store16 Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i64_store32(
memory: &mut [u8],
address: UntypedVal,
offset: u32,
value: UntypedVal,
) -> Result<(), TrapCode>
pub fn i64_store32( memory: &mut [u8], address: UntypedVal, offset: u32, value: UntypedVal, ) -> Result<(), TrapCode>
Executes the i64.store32 Wasm operation.
§Errors
- If
address + offsetoverflows. - If
address + offsetstores out of bounds frommemory.
Sourcepub fn i32_add(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_add(self, rhs: UntypedVal) -> UntypedVal
Execute i32.add Wasm operation.
Sourcepub fn i64_add(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_add(self, rhs: UntypedVal) -> UntypedVal
Execute i64.add Wasm operation.
Sourcepub fn i32_sub(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_sub(self, rhs: UntypedVal) -> UntypedVal
Execute i32.sub Wasm operation.
Sourcepub fn i64_sub(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_sub(self, rhs: UntypedVal) -> UntypedVal
Execute i64.sub Wasm operation.
Sourcepub fn i32_mul(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_mul(self, rhs: UntypedVal) -> UntypedVal
Execute i32.mul Wasm operation.
Sourcepub fn i64_mul(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_mul(self, rhs: UntypedVal) -> UntypedVal
Execute i64.mul Wasm operation.
Sourcepub fn i32_div_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i32_div_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i32.div_s Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i64_div_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i64_div_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i64.div_s Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i32_div_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i32_div_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i32.div_u Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i64_div_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i64_div_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i64.div_u Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i32_rem_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i32_rem_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i32.rem_s Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i64_rem_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i64_rem_s(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i64.rem_s Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i32_rem_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i32_rem_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i32.rem_u Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i64_rem_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
pub fn i64_rem_u(self, rhs: UntypedVal) -> Result<UntypedVal, TrapCode>
Execute i64.rem_u Wasm operation.
§Errors
- If
rhsis equal to zero. - If the operation result overflows.
Sourcepub fn i32_and(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_and(self, rhs: UntypedVal) -> UntypedVal
Execute i32.and Wasm operation.
Sourcepub fn i64_and(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_and(self, rhs: UntypedVal) -> UntypedVal
Execute i64.and Wasm operation.
Sourcepub fn i32_or(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_or(self, rhs: UntypedVal) -> UntypedVal
Execute i32.or Wasm operation.
Sourcepub fn i64_or(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_or(self, rhs: UntypedVal) -> UntypedVal
Execute i64.or Wasm operation.
Sourcepub fn i32_xor(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_xor(self, rhs: UntypedVal) -> UntypedVal
Execute i32.xor Wasm operation.
Sourcepub fn i64_xor(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_xor(self, rhs: UntypedVal) -> UntypedVal
Execute i64.xor Wasm operation.
Sourcepub fn i32_shl(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_shl(self, rhs: UntypedVal) -> UntypedVal
Execute i32.shl Wasm operation.
Sourcepub fn i64_shl(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_shl(self, rhs: UntypedVal) -> UntypedVal
Execute i64.shl Wasm operation.
Sourcepub fn i32_shr_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_shr_s(self, rhs: UntypedVal) -> UntypedVal
Execute i32.shr_s Wasm operation.
Sourcepub fn i64_shr_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_shr_s(self, rhs: UntypedVal) -> UntypedVal
Execute i64.shr_s Wasm operation.
Sourcepub fn i32_shr_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_shr_u(self, rhs: UntypedVal) -> UntypedVal
Execute i32.shr_u Wasm operation.
Sourcepub fn i64_shr_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_shr_u(self, rhs: UntypedVal) -> UntypedVal
Execute i64.shr_u Wasm operation.
Sourcepub fn i32_clz(self) -> UntypedVal
pub fn i32_clz(self) -> UntypedVal
Execute i32.clz Wasm operation.
Sourcepub fn i64_clz(self) -> UntypedVal
pub fn i64_clz(self) -> UntypedVal
Execute i64.clz Wasm operation.
Sourcepub fn i32_ctz(self) -> UntypedVal
pub fn i32_ctz(self) -> UntypedVal
Execute i32.ctz Wasm operation.
Sourcepub fn i64_ctz(self) -> UntypedVal
pub fn i64_ctz(self) -> UntypedVal
Execute i64.ctz Wasm operation.
Sourcepub fn i32_popcnt(self) -> UntypedVal
pub fn i32_popcnt(self) -> UntypedVal
Execute i32.popcnt Wasm operation.
Sourcepub fn i64_popcnt(self) -> UntypedVal
pub fn i64_popcnt(self) -> UntypedVal
Execute i64.popcnt Wasm operation.
Sourcepub fn i32_rotl(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_rotl(self, rhs: UntypedVal) -> UntypedVal
Execute i32.rotl Wasm operation.
Sourcepub fn i64_rotl(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_rotl(self, rhs: UntypedVal) -> UntypedVal
Execute i64.rotl Wasm operation.
Sourcepub fn i32_rotr(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_rotr(self, rhs: UntypedVal) -> UntypedVal
Execute i32.rotr Wasm operation.
Sourcepub fn i64_rotr(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_rotr(self, rhs: UntypedVal) -> UntypedVal
Execute i64.rotr Wasm operation.
Sourcepub fn i32_eqz(self) -> UntypedVal
pub fn i32_eqz(self) -> UntypedVal
Execute i32.eqz Wasm operation.
Sourcepub fn i64_eqz(self) -> UntypedVal
pub fn i64_eqz(self) -> UntypedVal
Execute i64.eqz Wasm operation.
Sourcepub fn i32_eq(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_eq(self, rhs: UntypedVal) -> UntypedVal
Execute i32.eq Wasm operation.
Sourcepub fn i64_eq(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_eq(self, rhs: UntypedVal) -> UntypedVal
Execute i64.eq Wasm operation.
Sourcepub fn f32_eq(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_eq(self, rhs: UntypedVal) -> UntypedVal
Execute f32.eq Wasm operation.
Sourcepub fn f64_eq(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_eq(self, rhs: UntypedVal) -> UntypedVal
Execute f64.eq Wasm operation.
Sourcepub fn i32_ne(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_ne(self, rhs: UntypedVal) -> UntypedVal
Execute i32.ne Wasm operation.
Sourcepub fn i64_ne(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_ne(self, rhs: UntypedVal) -> UntypedVal
Execute i64.ne Wasm operation.
Sourcepub fn f32_ne(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_ne(self, rhs: UntypedVal) -> UntypedVal
Execute f32.ne Wasm operation.
Sourcepub fn f64_ne(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_ne(self, rhs: UntypedVal) -> UntypedVal
Execute f64.ne Wasm operation.
Sourcepub fn i32_lt_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_lt_s(self, rhs: UntypedVal) -> UntypedVal
Execute i32.lt_s Wasm operation.
Sourcepub fn i64_lt_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_lt_s(self, rhs: UntypedVal) -> UntypedVal
Execute i64.lt_s Wasm operation.
Sourcepub fn i32_lt_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_lt_u(self, rhs: UntypedVal) -> UntypedVal
Execute i32.lt_u Wasm operation.
Sourcepub fn i64_lt_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_lt_u(self, rhs: UntypedVal) -> UntypedVal
Execute i64.lt_u Wasm operation.
Sourcepub fn f32_lt(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_lt(self, rhs: UntypedVal) -> UntypedVal
Execute f32.lt Wasm operation.
Sourcepub fn f64_lt(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_lt(self, rhs: UntypedVal) -> UntypedVal
Execute f64.lt Wasm operation.
Sourcepub fn i32_le_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_le_s(self, rhs: UntypedVal) -> UntypedVal
Execute i32.le_s Wasm operation.
Sourcepub fn i64_le_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_le_s(self, rhs: UntypedVal) -> UntypedVal
Execute i64.le_s Wasm operation.
Sourcepub fn i32_le_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_le_u(self, rhs: UntypedVal) -> UntypedVal
Execute i32.le_u Wasm operation.
Sourcepub fn i64_le_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_le_u(self, rhs: UntypedVal) -> UntypedVal
Execute i64.le_u Wasm operation.
Sourcepub fn f32_le(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_le(self, rhs: UntypedVal) -> UntypedVal
Execute f32.le Wasm operation.
Sourcepub fn f64_le(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_le(self, rhs: UntypedVal) -> UntypedVal
Execute f64.le Wasm operation.
Sourcepub fn i32_gt_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_gt_s(self, rhs: UntypedVal) -> UntypedVal
Execute i32.gt_s Wasm operation.
Sourcepub fn i64_gt_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_gt_s(self, rhs: UntypedVal) -> UntypedVal
Execute i64.gt_s Wasm operation.
Sourcepub fn i32_gt_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_gt_u(self, rhs: UntypedVal) -> UntypedVal
Execute i32.gt_u Wasm operation.
Sourcepub fn i64_gt_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_gt_u(self, rhs: UntypedVal) -> UntypedVal
Execute i64.gt_u Wasm operation.
Sourcepub fn f32_gt(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_gt(self, rhs: UntypedVal) -> UntypedVal
Execute f32.gt Wasm operation.
Sourcepub fn f64_gt(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_gt(self, rhs: UntypedVal) -> UntypedVal
Execute f64.gt Wasm operation.
Sourcepub fn i32_ge_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_ge_s(self, rhs: UntypedVal) -> UntypedVal
Execute i32.ge_s Wasm operation.
Sourcepub fn i64_ge_s(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_ge_s(self, rhs: UntypedVal) -> UntypedVal
Execute i64.ge_s Wasm operation.
Sourcepub fn i32_ge_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i32_ge_u(self, rhs: UntypedVal) -> UntypedVal
Execute i32.ge_u Wasm operation.
Sourcepub fn i64_ge_u(self, rhs: UntypedVal) -> UntypedVal
pub fn i64_ge_u(self, rhs: UntypedVal) -> UntypedVal
Execute i64.ge_u Wasm operation.
Sourcepub fn f32_ge(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_ge(self, rhs: UntypedVal) -> UntypedVal
Execute f32.ge Wasm operation.
Sourcepub fn f64_ge(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_ge(self, rhs: UntypedVal) -> UntypedVal
Execute f64.ge Wasm operation.
Sourcepub fn f32_abs(self) -> UntypedVal
pub fn f32_abs(self) -> UntypedVal
Execute f32.abs Wasm operation.
Sourcepub fn f32_neg(self) -> UntypedVal
pub fn f32_neg(self) -> UntypedVal
Execute f32.neg Wasm operation.
Sourcepub fn f32_ceil(self) -> UntypedVal
pub fn f32_ceil(self) -> UntypedVal
Execute f32.ceil Wasm operation.
Sourcepub fn f32_floor(self) -> UntypedVal
pub fn f32_floor(self) -> UntypedVal
Execute f32.floor Wasm operation.
Sourcepub fn f32_trunc(self) -> UntypedVal
pub fn f32_trunc(self) -> UntypedVal
Execute f32.trunc Wasm operation.
Sourcepub fn f32_nearest(self) -> UntypedVal
pub fn f32_nearest(self) -> UntypedVal
Execute f32.nearest Wasm operation.
Sourcepub fn f32_sqrt(self) -> UntypedVal
pub fn f32_sqrt(self) -> UntypedVal
Execute f32.sqrt Wasm operation.
Sourcepub fn f32_min(self, other: UntypedVal) -> UntypedVal
pub fn f32_min(self, other: UntypedVal) -> UntypedVal
Execute f32.min Wasm operation.
Sourcepub fn f32_max(self, other: UntypedVal) -> UntypedVal
pub fn f32_max(self, other: UntypedVal) -> UntypedVal
Execute f32.max Wasm operation.
Sourcepub fn f32_copysign(self, other: UntypedVal) -> UntypedVal
pub fn f32_copysign(self, other: UntypedVal) -> UntypedVal
Execute f32.copysign Wasm operation.
Sourcepub fn f64_abs(self) -> UntypedVal
pub fn f64_abs(self) -> UntypedVal
Execute f64.abs Wasm operation.
Sourcepub fn f64_neg(self) -> UntypedVal
pub fn f64_neg(self) -> UntypedVal
Execute f64.neg Wasm operation.
Sourcepub fn f64_ceil(self) -> UntypedVal
pub fn f64_ceil(self) -> UntypedVal
Execute f64.ceil Wasm operation.
Sourcepub fn f64_floor(self) -> UntypedVal
pub fn f64_floor(self) -> UntypedVal
Execute f64.floor Wasm operation.
Sourcepub fn f64_trunc(self) -> UntypedVal
pub fn f64_trunc(self) -> UntypedVal
Execute f64.trunc Wasm operation.
Sourcepub fn f64_nearest(self) -> UntypedVal
pub fn f64_nearest(self) -> UntypedVal
Execute f64.nearest Wasm operation.
Sourcepub fn f64_sqrt(self) -> UntypedVal
pub fn f64_sqrt(self) -> UntypedVal
Execute f64.sqrt Wasm operation.
Sourcepub fn f32_add(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_add(self, rhs: UntypedVal) -> UntypedVal
Execute f32.add Wasm operation.
Sourcepub fn f64_add(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_add(self, rhs: UntypedVal) -> UntypedVal
Execute f64.add Wasm operation.
Sourcepub fn f32_sub(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_sub(self, rhs: UntypedVal) -> UntypedVal
Execute f32.sub Wasm operation.
Sourcepub fn f64_sub(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_sub(self, rhs: UntypedVal) -> UntypedVal
Execute f64.sub Wasm operation.
Sourcepub fn f32_mul(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_mul(self, rhs: UntypedVal) -> UntypedVal
Execute f32.mul Wasm operation.
Sourcepub fn f64_mul(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_mul(self, rhs: UntypedVal) -> UntypedVal
Execute f64.mul Wasm operation.
Sourcepub fn f32_div(self, rhs: UntypedVal) -> UntypedVal
pub fn f32_div(self, rhs: UntypedVal) -> UntypedVal
Execute f32.div Wasm operation.
Sourcepub fn f64_div(self, rhs: UntypedVal) -> UntypedVal
pub fn f64_div(self, rhs: UntypedVal) -> UntypedVal
Execute f64.div Wasm operation.
Sourcepub fn f64_min(self, other: UntypedVal) -> UntypedVal
pub fn f64_min(self, other: UntypedVal) -> UntypedVal
Execute f64.min Wasm operation.
Sourcepub fn f64_max(self, other: UntypedVal) -> UntypedVal
pub fn f64_max(self, other: UntypedVal) -> UntypedVal
Execute f64.max Wasm operation.
Sourcepub fn f64_copysign(self, other: UntypedVal) -> UntypedVal
pub fn f64_copysign(self, other: UntypedVal) -> UntypedVal
Execute f64.copysign Wasm operation.
Sourcepub fn i32_wrap_i64(self) -> UntypedVal
pub fn i32_wrap_i64(self) -> UntypedVal
Execute i32.wrap_i64 Wasm operation.
Sourcepub fn i32_trunc_f32_s(self) -> Result<UntypedVal, TrapCode>
pub fn i32_trunc_f32_s(self) -> Result<UntypedVal, TrapCode>
Execute i32.trunc_f32_s Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i32_trunc_f32_u(self) -> Result<UntypedVal, TrapCode>
pub fn i32_trunc_f32_u(self) -> Result<UntypedVal, TrapCode>
Execute i32.trunc_f32_u Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i32_trunc_f64_s(self) -> Result<UntypedVal, TrapCode>
pub fn i32_trunc_f64_s(self) -> Result<UntypedVal, TrapCode>
Execute i32.trunc_f64_s Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i32_trunc_f64_u(self) -> Result<UntypedVal, TrapCode>
pub fn i32_trunc_f64_u(self) -> Result<UntypedVal, TrapCode>
Execute i32.trunc_f64_u Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i64_extend_i32_s(self) -> UntypedVal
pub fn i64_extend_i32_s(self) -> UntypedVal
Execute i64.extend_i32_s Wasm operation.
Sourcepub fn i64_extend_i32_u(self) -> UntypedVal
pub fn i64_extend_i32_u(self) -> UntypedVal
Execute i64.extend_i32_u Wasm operation.
Sourcepub fn i64_trunc_f32_s(self) -> Result<UntypedVal, TrapCode>
pub fn i64_trunc_f32_s(self) -> Result<UntypedVal, TrapCode>
Execute i64.trunc_f32_s Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i64_trunc_f32_u(self) -> Result<UntypedVal, TrapCode>
pub fn i64_trunc_f32_u(self) -> Result<UntypedVal, TrapCode>
Execute i64.trunc_f32_u Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i64_trunc_f64_s(self) -> Result<UntypedVal, TrapCode>
pub fn i64_trunc_f64_s(self) -> Result<UntypedVal, TrapCode>
Execute i64.trunc_f64_s Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn i64_trunc_f64_u(self) -> Result<UntypedVal, TrapCode>
pub fn i64_trunc_f64_u(self) -> Result<UntypedVal, TrapCode>
Execute i64.trunc_f64_u Wasm operation.
§Errors
- If
selfis NaN (not a number). - If
selfis positive or negative infinity. - If the integer value of
selfis out of bounds of the target type.
Read more about the failure cases in the WebAssembly specification.
Sourcepub fn f32_convert_i32_s(self) -> UntypedVal
pub fn f32_convert_i32_s(self) -> UntypedVal
Execute f32.convert_i32_s Wasm operation.
Sourcepub fn f32_convert_i32_u(self) -> UntypedVal
pub fn f32_convert_i32_u(self) -> UntypedVal
Execute f32.convert_i32_u Wasm operation.
Sourcepub fn f32_convert_i64_s(self) -> UntypedVal
pub fn f32_convert_i64_s(self) -> UntypedVal
Execute f32.convert_i64_s Wasm operation.
Sourcepub fn f32_convert_i64_u(self) -> UntypedVal
pub fn f32_convert_i64_u(self) -> UntypedVal
Execute f32.convert_i64_u Wasm operation.
Sourcepub fn f32_demote_f64(self) -> UntypedVal
pub fn f32_demote_f64(self) -> UntypedVal
Execute f32.demote_f64 Wasm operation.
Sourcepub fn f64_convert_i32_s(self) -> UntypedVal
pub fn f64_convert_i32_s(self) -> UntypedVal
Execute f64.convert_i32_s Wasm operation.
Sourcepub fn f64_convert_i32_u(self) -> UntypedVal
pub fn f64_convert_i32_u(self) -> UntypedVal
Execute f64.convert_i32_u Wasm operation.
Sourcepub fn f64_convert_i64_s(self) -> UntypedVal
pub fn f64_convert_i64_s(self) -> UntypedVal
Execute f64.convert_i64_s Wasm operation.
Sourcepub fn f64_convert_i64_u(self) -> UntypedVal
pub fn f64_convert_i64_u(self) -> UntypedVal
Execute f64.convert_i64_u Wasm operation.
Sourcepub fn f64_promote_f32(self) -> UntypedVal
pub fn f64_promote_f32(self) -> UntypedVal
Execute f64.promote_f32 Wasm operation.
Sourcepub fn i32_extend8_s(self) -> UntypedVal
pub fn i32_extend8_s(self) -> UntypedVal
Execute i32.extend8_s Wasm operation.
Sourcepub fn i32_extend16_s(self) -> UntypedVal
pub fn i32_extend16_s(self) -> UntypedVal
Execute i32.extend16_s Wasm operation.
Sourcepub fn i64_extend8_s(self) -> UntypedVal
pub fn i64_extend8_s(self) -> UntypedVal
Execute i64.extend8_s Wasm operation.
Sourcepub fn i64_extend16_s(self) -> UntypedVal
pub fn i64_extend16_s(self) -> UntypedVal
Execute i64.extend16_s Wasm operation.
Sourcepub fn i64_extend32_s(self) -> UntypedVal
pub fn i64_extend32_s(self) -> UntypedVal
Execute i64.extend32_s Wasm operation.
Sourcepub fn i32_trunc_sat_f32_s(self) -> UntypedVal
pub fn i32_trunc_sat_f32_s(self) -> UntypedVal
Execute i32.trunc_sat_f32_s Wasm operation.
Sourcepub fn i32_trunc_sat_f32_u(self) -> UntypedVal
pub fn i32_trunc_sat_f32_u(self) -> UntypedVal
Execute i32.trunc_sat_f32_u Wasm operation.
Sourcepub fn i32_trunc_sat_f64_s(self) -> UntypedVal
pub fn i32_trunc_sat_f64_s(self) -> UntypedVal
Execute i32.trunc_sat_f64_s Wasm operation.
Sourcepub fn i32_trunc_sat_f64_u(self) -> UntypedVal
pub fn i32_trunc_sat_f64_u(self) -> UntypedVal
Execute i32.trunc_sat_f64_u Wasm operation.
Sourcepub fn i64_trunc_sat_f32_s(self) -> UntypedVal
pub fn i64_trunc_sat_f32_s(self) -> UntypedVal
Execute i64.trunc_sat_f32_s Wasm operation.
Sourcepub fn i64_trunc_sat_f32_u(self) -> UntypedVal
pub fn i64_trunc_sat_f32_u(self) -> UntypedVal
Execute i64.trunc_sat_f32_u Wasm operation.
Sourcepub fn i64_trunc_sat_f64_s(self) -> UntypedVal
pub fn i64_trunc_sat_f64_s(self) -> UntypedVal
Execute i64.trunc_sat_f64_s Wasm operation.
Sourcepub fn i64_trunc_sat_f64_u(self) -> UntypedVal
pub fn i64_trunc_sat_f64_u(self) -> UntypedVal
Execute i64.trunc_sat_f64_u Wasm operation.
Source§impl UntypedVal
impl UntypedVal
Sourcepub fn decode_slice<T>(slice: &[UntypedVal]) -> Result<T, UntypedError>where
T: DecodeUntypedSlice,
pub fn decode_slice<T>(slice: &[UntypedVal]) -> Result<T, UntypedError>where
T: DecodeUntypedSlice,
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.
Sourcepub fn encode_slice<T>(
slice: &mut [UntypedVal],
input: T,
) -> Result<(), UntypedError>where
T: EncodeUntypedSlice,
pub fn encode_slice<T>(
slice: &mut [UntypedVal],
input: T,
) -> Result<(), UntypedError>where
T: EncodeUntypedSlice,
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
impl Clone for UntypedVal
Source§fn clone(&self) -> UntypedVal
fn clone(&self) -> UntypedVal
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UntypedVal
impl Debug for UntypedVal
Source§impl Default for UntypedVal
impl Default for UntypedVal
Source§fn default() -> UntypedVal
fn default() -> UntypedVal
Source§impl From<ExternRef> for UntypedVal
impl From<ExternRef> for UntypedVal
Source§impl From<F32> for UntypedVal
impl From<F32> for UntypedVal
Source§fn from(value: F32) -> UntypedVal
fn from(value: F32) -> UntypedVal
Source§impl From<F64> for UntypedVal
impl From<F64> for UntypedVal
Source§fn from(value: F64) -> UntypedVal
fn from(value: F64) -> UntypedVal
Source§impl From<FuncRef> for UntypedVal
impl From<FuncRef> for UntypedVal
Source§impl From<UntypedVal> for ExternRef
impl From<UntypedVal> for ExternRef
Source§fn from(untyped: UntypedVal) -> Self
fn from(untyped: UntypedVal) -> Self
Source§impl From<UntypedVal> for F32
impl From<UntypedVal> for F32
Source§fn from(untyped: UntypedVal) -> F32
fn from(untyped: UntypedVal) -> F32
Source§impl From<UntypedVal> for F64
impl From<UntypedVal> for F64
Source§fn from(untyped: UntypedVal) -> F64
fn from(untyped: UntypedVal) -> F64
Source§impl From<UntypedVal> for FuncRef
impl From<UntypedVal> for FuncRef
Source§fn from(untyped: UntypedVal) -> Self
fn from(untyped: UntypedVal) -> Self
Source§impl From<Val> for UntypedVal
impl From<Val> for UntypedVal
Source§impl From<bool> for UntypedVal
impl From<bool> for UntypedVal
Source§fn from(value: bool) -> UntypedVal
fn from(value: bool) -> UntypedVal
Source§impl From<f32> for UntypedVal
impl From<f32> for UntypedVal
Source§fn from(value: f32) -> UntypedVal
fn from(value: f32) -> UntypedVal
Source§impl From<f64> for UntypedVal
impl From<f64> for UntypedVal
Source§fn from(value: f64) -> UntypedVal
fn from(value: f64) -> UntypedVal
Source§impl From<i16> for UntypedVal
impl From<i16> for UntypedVal
Source§fn from(value: i16) -> UntypedVal
fn from(value: i16) -> UntypedVal
Source§impl From<i32> for UntypedVal
impl From<i32> for UntypedVal
Source§fn from(value: i32) -> UntypedVal
fn from(value: i32) -> UntypedVal
Source§impl From<i64> for UntypedVal
impl From<i64> for UntypedVal
Source§fn from(value: i64) -> UntypedVal
fn from(value: i64) -> UntypedVal
Source§impl From<i8> for UntypedVal
impl From<i8> for UntypedVal
Source§fn from(value: i8) -> UntypedVal
fn from(value: i8) -> UntypedVal
Source§impl From<u16> for UntypedVal
impl From<u16> for UntypedVal
Source§fn from(value: u16) -> UntypedVal
fn from(value: u16) -> UntypedVal
Source§impl From<u32> for UntypedVal
impl From<u32> for UntypedVal
Source§fn from(value: u32) -> UntypedVal
fn from(value: u32) -> UntypedVal
Source§impl From<u64> for UntypedVal
impl From<u64> for UntypedVal
Source§fn from(value: u64) -> UntypedVal
fn from(value: u64) -> UntypedVal
Source§impl From<u8> for UntypedVal
impl From<u8> for UntypedVal
Source§fn from(value: u8) -> UntypedVal
fn from(value: u8) -> UntypedVal
Source§impl Ord for UntypedVal
impl Ord for UntypedVal
Source§fn cmp(&self, other: &UntypedVal) -> Ordering
fn cmp(&self, other: &UntypedVal) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for UntypedVal
impl PartialEq for UntypedVal
Source§impl PartialOrd for UntypedVal
impl PartialOrd for UntypedVal
impl Copy for UntypedVal
impl Eq for UntypedVal
impl StructuralPartialEq for UntypedVal
Auto Trait Implementations§
impl Freeze for UntypedVal
impl RefUnwindSafe for UntypedVal
impl Send for UntypedVal
impl Sync for UntypedVal
impl Unpin for UntypedVal
impl UnwindSafe for UntypedVal
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T1> DecodeUntypedSlice for T1where
T1: From<UntypedVal>,
impl<T1> DecodeUntypedSlice for T1where
T1: From<UntypedVal>,
Source§fn decode_untyped_slice(results: &[UntypedVal]) -> Result<T1, UntypedError>
fn decode_untyped_slice(results: &[UntypedVal]) -> 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>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.