pub struct TaggedUSize(/* private fields */);
Expand description
Value with size_of::<usize>() - 2
bits of payload and 2 flag bits
Implementations§
Source§impl TaggedUSize
impl TaggedUSize
pub const MASK1: usize = 9_223_372_036_854_775_808usize
pub const MASK2: usize = 4_611_686_018_427_387_904usize
pub fn new(payload: usize) -> TaggedUSize
pub fn with_bit1(self) -> TaggedUSize
pub fn with_bit2(self) -> TaggedUSize
pub fn payload(self) -> usize
pub fn bit1(self) -> bool
pub fn bit2(self) -> bool
Trait Implementations§
Source§impl Clone for TaggedUSize
impl Clone for TaggedUSize
Source§fn clone(&self) -> TaggedUSize
fn clone(&self) -> TaggedUSize
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 TaggedUSize
impl Debug for TaggedUSize
Source§impl Default for TaggedUSize
impl Default for TaggedUSize
Source§fn default() -> TaggedUSize
fn default() -> TaggedUSize
Returns the “default value” for a type. Read more
Source§impl Ord for TaggedUSize
impl Ord for TaggedUSize
Source§fn cmp(&self, other: &TaggedUSize) -> Ordering
fn cmp(&self, other: &TaggedUSize) -> Ordering
1.21.0 · 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 PartialEq for TaggedUSize
impl PartialEq for TaggedUSize
Source§impl PartialOrd for TaggedUSize
impl PartialOrd for TaggedUSize
impl Copy for TaggedUSize
impl Eq for TaggedUSize
impl StructuralPartialEq for TaggedUSize
Auto Trait Implementations§
impl Freeze for TaggedUSize
impl RefUnwindSafe for TaggedUSize
impl Send for TaggedUSize
impl Sync for TaggedUSize
impl Unpin for TaggedUSize
impl UnwindSafe for TaggedUSize
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,
Source§impl<T> HeapSpace for Twhere
T: Copy,
impl<T> HeapSpace for Twhere
T: Copy,
Source§fn heap_space(&self) -> usize
fn heap_space(&self) -> usize
The number of bytes allocated on the heap that this owns.