pub struct SlotHandle {
pub slab: usize,
pub index: usize,
}Expand description
An opaque handle to a slot in a SlabAllocator.
Handles are returned by allocate and are valid until free is
called on the same handle. Using a freed handle is safe: get and
get_mut return Err(SlabError::SlotAlreadyFree).
Fields§
§slab: usizeIndex into the slab array.
index: usizeIndex within the slab.
Trait Implementations§
Source§impl Clone for SlotHandle
impl Clone for SlotHandle
Source§fn clone(&self) -> SlotHandle
fn clone(&self) -> SlotHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SlotHandle
Source§impl Debug for SlotHandle
impl Debug for SlotHandle
impl Eq for SlotHandle
Source§impl Hash for SlotHandle
impl Hash for SlotHandle
Source§impl PartialEq for SlotHandle
impl PartialEq for SlotHandle
Source§fn eq(&self, other: &SlotHandle) -> bool
fn eq(&self, other: &SlotHandle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SlotHandle
Auto Trait Implementations§
impl Freeze for SlotHandle
impl RefUnwindSafe for SlotHandle
impl Send for SlotHandle
impl Sync for SlotHandle
impl Unpin for SlotHandle
impl UnsafeUnpin for SlotHandle
impl UnwindSafe for SlotHandle
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