pub enum NumberType {
I32,
I64,
F32,
F64,
}Expand description
Number types classify numeric values. Number types are transparent, meaning that their bit patterns can be observed. Values of number type can be stored in memories.
See https://webassembly.github.io/spec/core/syntax/types.html#number-types
§Examples
use wasm_ast::{ValueType, NumberType};
assert_eq!(ValueType::I32, NumberType::I32.into());
assert_eq!(ValueType::I64, NumberType::I64.into());
assert_eq!(ValueType::F32, NumberType::F32.into());
assert_eq!(ValueType::F64, NumberType::F64.into());Variants§
Trait Implementations§
Source§impl Clone for NumberType
impl Clone for NumberType
Source§fn clone(&self) -> NumberType
fn clone(&self) -> NumberType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumberType
impl Debug for NumberType
Source§impl From<FloatType> for NumberType
impl From<FloatType> for NumberType
Source§impl From<IntegerType> for NumberType
impl From<IntegerType> for NumberType
Source§fn from(kind: IntegerType) -> Self
fn from(kind: IntegerType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NumberType
impl PartialEq for NumberType
impl Copy for NumberType
impl Eq for NumberType
impl StructuralPartialEq for NumberType
Auto Trait Implementations§
impl Freeze for NumberType
impl RefUnwindSafe for NumberType
impl Send for NumberType
impl Sync for NumberType
impl Unpin for NumberType
impl UnwindSafe for NumberType
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