pub struct IterableSlab<T, const N: usize> { /* private fields */ }Implementations§
Source§impl<T, const N: usize> IterableSlab<T, N>
impl<T, const N: usize> IterableSlab<T, N>
pub fn new() -> Self
Sourcepub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T
pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T
After removing an element, be cautious as you might still unintentionally access it using Self::get_unchecked_mut.
pub unsafe fn get_unchecked(&self, index: usize) -> &T
pub fn clear(&mut self)
pub unsafe fn remove_unchecked(&mut self, index: usize)
pub fn add_with_index<F>(&mut self, f: F) -> Result<usize, ()>
pub fn len(&self) -> usize
pub fn iter(&self) -> SlabIter<'_, T, N> ⓘ
pub fn iter_mut(&mut self) -> SlabIterMut<'_, T, N> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> Freeze for IterableSlab<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for IterableSlab<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for IterableSlab<T, N>where
T: Send,
impl<T, const N: usize> Sync for IterableSlab<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for IterableSlab<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for IterableSlab<T, N>where
T: UnsafeUnpin,
impl<T, const N: usize> UnwindSafe for IterableSlab<T, N>where
T: UnwindSafe,
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