pub enum NativeType {
I8,
I16,
I32,
I64,
F32,
F64,
Ptr,
FuncRef,
Void,
}Expand description
Machine-level types for the native IR.
Variants§
I8
8-bit integer.
I16
16-bit integer.
I32
32-bit integer.
I64
64-bit integer.
F32
32-bit floating point.
F64
64-bit floating point.
Ptr
Pointer (word-sized).
FuncRef
Function reference.
Void
Void (no value).
Implementations§
Source§impl NativeType
impl NativeType
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Size in bytes of this type.
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Whether this is an integer type.
Sourcepub fn is_pointer(&self) -> bool
pub fn is_pointer(&self) -> bool
Whether this is a pointer type.
Trait Implementations§
Source§impl Clone for NativeType
impl Clone for NativeType
Source§fn clone(&self) -> NativeType
fn clone(&self) -> NativeType
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 NativeType
impl Debug for NativeType
Source§impl Display for NativeType
impl Display for NativeType
Source§impl Hash for NativeType
impl Hash for NativeType
Source§impl PartialEq for NativeType
impl PartialEq for NativeType
impl Copy for NativeType
impl Eq for NativeType
impl StructuralPartialEq for NativeType
Auto Trait Implementations§
impl Freeze for NativeType
impl RefUnwindSafe for NativeType
impl Send for NativeType
impl Sync for NativeType
impl Unpin for NativeType
impl UnsafeUnpin for NativeType
impl UnwindSafe for NativeType
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