pub struct CellKey { /* private fields */ }
Expand description
Struct that defines a packaged index into a Prison
This struct is designed to be passed to some other struct or function that needs to be able to reference the data stored at the cell number.
Implementations§
Source§impl CellKey
impl CellKey
Sourcepub fn from_raw_parts(idx: usize, gen: usize) -> CellKey
pub fn from_raw_parts(idx: usize, gen: usize) -> CellKey
Create a new index from an index and generation
Not recomended in most cases, as there is no way to guarantee an item with that exact index and generation exists in your Prison
Sourcepub fn into_raw_parts(&self) -> (usize, usize)
pub fn into_raw_parts(&self) -> (usize, usize)
Return the internal index and generation from the cell key, in that order
Not recomended in most cases. If you need just the index by itself, use CellKey::idx() instead
Trait Implementations§
impl Copy for CellKey
impl Eq for CellKey
impl StructuralPartialEq for CellKey
Auto Trait Implementations§
impl Freeze for CellKey
impl RefUnwindSafe for CellKey
impl Send for CellKey
impl Sync for CellKey
impl Unpin for CellKey
impl UnwindSafe for CellKey
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