pub struct Slab<T> { /* private fields */ }
Implementations§
Source§impl<T> Slab<T>
impl<T> Slab<T>
Sourcepub fn with_capacity(capacity: usize) -> Slab<T>
pub fn with_capacity(capacity: usize) -> Slab<T>
Sourcepub fn insert(&mut self, elem: T)
pub fn insert(&mut self, elem: T)
Inserts a new element into the slab, re-allocating if neccessary.
§Panics
- If the host system is out of memory.
Sourcepub fn iter_mut(&mut self) -> SlabMutIter<'_, T> ⓘ
pub fn iter_mut(&mut self) -> SlabMutIter<'_, T> ⓘ
Returns a mutable iterator over the slab
Trait Implementations§
Source§impl<'a, T> IntoIterator for &'a Slab<T>
impl<'a, T> IntoIterator for &'a Slab<T>
Source§impl<'a, T> IntoIterator for &'a mut Slab<T>
impl<'a, T> IntoIterator for &'a mut Slab<T>
Auto Trait Implementations§
impl<T> Freeze for Slab<T>
impl<T> RefUnwindSafe for Slab<T>where
T: RefUnwindSafe,
impl<T> !Send for Slab<T>
impl<T> !Sync for Slab<T>
impl<T> Unpin for Slab<T>
impl<T> UnwindSafe for Slab<T>where
T: RefUnwindSafe,
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