pub struct SlotId { /* private fields */ }Expand description
A validated heap-reference payload: segment:u16 << 32 | slot:u32, both
nonzero. Illegal (zero) identities are unrepresentable.
Implementations§
Source§impl SlotId
impl SlotId
Sourcepub const fn new(segment: NonZeroU16, slot: NonZeroU32) -> Self
pub const fn new(segment: NonZeroU16, slot: NonZeroU32) -> Self
The total constructor over already-validated nonzero fields.
Sourcepub const fn from_parts(segment: u16, slot: u32) -> Option<Self>
pub const fn from_parts(segment: u16, slot: u32) -> Option<Self>
Parses raw parts, rejecting a zero segment or zero slot (unpackSlot).
Trait Implementations§
impl Copy for SlotId
impl Eq for SlotId
impl StructuralPartialEq for SlotId
Auto Trait Implementations§
impl Freeze for SlotId
impl RefUnwindSafe for SlotId
impl Send for SlotId
impl Sync for SlotId
impl Unpin for SlotId
impl UnsafeUnpin for SlotId
impl UnwindSafe for SlotId
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