pub enum Primitive {
U8 = 1,
U16 = 2,
U32 = 4,
U64 = 8,
}Expand description
A primitive that can be read with machine-word coherence.
Variants§
U8 = 1
u8-level coherence.
U16 = 2
u16-level coherence.
U32 = 4
u32-level coherence.
U64 = 8
u64-level coherence.
Implementations§
Source§impl Primitive
impl Primitive
Sourcepub const fn appropriate<T>() -> Option<Self>where
T: Unassociated,
pub const fn appropriate<T>() -> Option<Self>where
T: Unassociated,
Determine an appropriate Primitive type variant for the target type.
Trait Implementations§
impl Copy for Primitive
impl Eq for Primitive
Source§impl Ord for Primitive
impl Ord for Primitive
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
Source§impl PartialOrd for Primitive
impl PartialOrd for Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
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