pub enum ValType {
I32,
I64,
F32,
F64,
V128,
FuncRef,
ExternRef,
}Expand description
Type of a value.
See Val for details.
Variants§
I32
32-bit signed or unsigned integer.
I64
64-bit signed or unsigned integer.
F32
32-bit IEEE 754-2008 floating point number.
F64
64-bit IEEE 754-2008 floating point number.
V128
A 128-bit Wasm simd proposal vector.
FuncRef
A nullable function reference.
ExternRef
A nullable external reference.
Implementations§
Source§impl ValType
impl ValType
Sourcepub fn is_num(&self) -> bool
pub fn is_num(&self) -> bool
Returns true if ValType is a Wasm numeric type.
This is true for ValType::I32, ValType::I64,
ValType::F32 and ValType::F64.
Sourcepub fn is_ref(&self) -> bool
pub fn is_ref(&self) -> bool
Returns true if ValType is a Wasm reference type.
This is true for ValType::FuncRef and ValType::ExternRef.
Trait Implementations§
Source§impl Ord for ValType
impl Ord for ValType
Source§impl PartialOrd for ValType
impl PartialOrd for ValType
impl Copy for ValType
impl Eq for ValType
impl StructuralPartialEq for ValType
Auto Trait Implementations§
impl Freeze for ValType
impl RefUnwindSafe for ValType
impl Send for ValType
impl Sync for ValType
impl Unpin for ValType
impl UnwindSafe for ValType
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
Mutably borrows from an owned value. Read more