Struct NonMaxU64
pub struct NonMaxU64(/* private fields */);Expand description
A
u64
value that is known not to be
u64::MAX.
This enables some memory layout optimizations. For example,
Option<u64>
is the same size as
u64:
assert_eq!(
core::mem::size_of::<u32>(),
core::mem::size_of::<Option<NonMaxU32>>(),
);Implementations§
Trait Implementations§
§impl Ord for NonMaxU64
impl Ord for NonMaxU64
§impl PartialOrd for NonMaxU64
impl PartialOrd for NonMaxU64
impl Copy for NonMaxU64
impl Eq for NonMaxU64
impl StructuralPartialEq for NonMaxU64
Auto Trait Implementations§
impl Freeze for NonMaxU64
impl RefUnwindSafe for NonMaxU64
impl Send for NonMaxU64
impl Sync for NonMaxU64
impl Unpin for NonMaxU64
impl UnwindSafe for NonMaxU64
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.