Struct ruyi::slab::Slab
[−]
[src]
pub struct Slab<T, I = usize> { /* fields omitted */ }
Methods
impl<T, I> Slab<T, I>
[src]
impl<T, I: From<usize> + Into<usize>> Slab<T, I>
[src]
fn capacity(&self) -> usize
fn clear(&mut self)
fn reserve(&mut self, additional: usize)
fn reserve_exact(&mut self, additional: usize)
fn insert(&mut self, elem: T) -> I
fn remove(&mut self, idx: I) -> Option<T>
fn get(&self, idx: I) -> Option<&T>
fn get_mut(&mut self, idx: I) -> Option<&mut T>
unsafe fn get_unchecked(&self, idx: I) -> &T
unsafe fn get_unchecked_mut(&mut self, idx: I) -> &mut T
Trait Implementations
impl<T: Debug, I: Debug> Debug for Slab<T, I>
[src]
impl<T: Send, I> Send for Slab<T, I>
[src]
impl<T, I: From<usize> + Into<usize>> Index<I> for Slab<T, I>
[src]
type Output = T
The returned type after indexing
fn index(&self, idx: I) -> &T
The method for the indexing (container[index]
) operation
impl<T, I: From<usize> + Into<usize>> IndexMut<I> for Slab<T, I>
[src]
fn index_mut(&mut self, idx: I) -> &mut T
The method for the mutable indexing (container[index]
) operation