pub enum PrimTy {
I32,
I64,
U32,
U64,
F32,
F64,
Char,
Addr,
}Expand description
Unboxed primitive types for the Numeric Profile.
These types represent machine-level primitives that are:
- Unboxed: No heap allocation, stored directly in registers/stack
- Strict: Always fully evaluated, no thunks
- Fixed-size: Known size at compile time
Used in Numeric Profile for zero-overhead numeric computation. See H26-SPEC Section 6.2 for unboxed type requirements.
Variants§
I32
32-bit signed integer (Int32#).
I64
64-bit signed integer (Int64#, Int#).
U32
32-bit unsigned integer (Word32#).
U64
64-bit unsigned integer (Word64#, Word#).
F32
32-bit IEEE 754 float (Float#).
F64
64-bit IEEE 754 double (Double#).
Char
8-bit character/byte (Char#).
Addr
Machine-sized pointer (Addr#).
Implementations§
Source§impl PrimTy
impl PrimTy
Sourcepub const fn size_bytes(self) -> usize
pub const fn size_bytes(self) -> usize
Returns the size in bytes of this primitive type.
Sourcepub const fn is_signed_int(self) -> bool
pub const fn is_signed_int(self) -> bool
Returns true if this is a signed integer type.
Sourcepub const fn is_unsigned_int(self) -> bool
pub const fn is_unsigned_int(self) -> bool
Returns true if this is an unsigned integer type.
Sourcepub const fn is_numeric(self) -> bool
pub const fn is_numeric(self) -> bool
Returns true if this is a numeric type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PrimTy
impl<'de> Deserialize<'de> for PrimTy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for PrimTy
impl Eq for PrimTy
impl StructuralPartialEq for PrimTy
Auto Trait Implementations§
impl Freeze for PrimTy
impl RefUnwindSafe for PrimTy
impl Send for PrimTy
impl Sync for PrimTy
impl Unpin for PrimTy
impl UnsafeUnpin for PrimTy
impl UnwindSafe for PrimTy
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