pub enum PrimitiveKind {
Show 15 variants
Boolean,
Octet,
Char,
WChar,
Int8,
UInt8,
Int16,
UInt16,
Int32,
UInt32,
Int64,
UInt64,
Float32,
Float64,
Float128,
}Expand description
Built-in scalar kinds. Spec §3.2, primitive row.
Variants§
Boolean
boolean
Octet
octet
Char
char
WChar
wchar
Int8
int8
UInt8
uint8
Int16
short
UInt16
unsigned short
Int32
long
UInt32
unsigned long
Int64
long long
UInt64
unsigned long long
Float32
float
Float64
double
Float128
long double.
Representable regardless of any target language’s ability to hold
it: the model describes the type, it does not evaluate it. The
known Rust f128 gap constrains backends, not this model.
Implementations§
Source§impl PrimitiveKind
impl PrimitiveKind
Sourcepub const ALL: [Self; 15]
pub const ALL: [Self; 15]
Every primitive, in specification order.
Used by conformance tests to assert the set is complete rather than merely claimed complete.
Sourcepub const fn is_integral(self) -> bool
pub const fn is_integral(self) -> bool
Whether the primitive is an integral type. Bitset holder types and enum bit bounds both need this distinction.
Trait Implementations§
Source§impl Clone for PrimitiveKind
impl Clone for PrimitiveKind
impl Copy for PrimitiveKind
Source§impl Debug for PrimitiveKind
impl Debug for PrimitiveKind
impl Eq for PrimitiveKind
Source§impl Hash for PrimitiveKind
impl Hash for PrimitiveKind
Source§impl Ord for PrimitiveKind
impl Ord for PrimitiveKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PrimitiveKind
impl PartialEq for PrimitiveKind
Source§impl PartialOrd for PrimitiveKind
impl PartialOrd for PrimitiveKind
impl StructuralPartialEq for PrimitiveKind
Auto Trait Implementations§
impl Freeze for PrimitiveKind
impl RefUnwindSafe for PrimitiveKind
impl Send for PrimitiveKind
impl Sync for PrimitiveKind
impl Unpin for PrimitiveKind
impl UnsafeUnpin for PrimitiveKind
impl UnwindSafe for PrimitiveKind
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