pub struct ProtectKey {
slot: u32,
generation: u32,
}Expand description
Generational key for a slot in a ProtectPool.
Contains a slot index and a generation counter. If a slot is released and
reused, the old key’s generation won’t match and operations will safely
return None or no-op.
8 bytes: 4-byte slot index + 4-byte generation.
Fields§
§slot: u32§generation: u32Trait Implementations§
Source§impl Clone for ProtectKey
impl Clone for ProtectKey
Source§fn clone(&self) -> ProtectKey
fn clone(&self) -> ProtectKey
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 ProtectKey
impl Debug for ProtectKey
Source§impl Hash for ProtectKey
impl Hash for ProtectKey
Source§impl PartialEq for ProtectKey
impl PartialEq for ProtectKey
impl Copy for ProtectKey
impl Eq for ProtectKey
impl StructuralPartialEq for ProtectKey
Auto Trait Implementations§
impl Freeze for ProtectKey
impl RefUnwindSafe for ProtectKey
impl Send for ProtectKey
impl Sync for ProtectKey
impl Unpin for ProtectKey
impl UnsafeUnpin for ProtectKey
impl UnwindSafe for ProtectKey
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