[][src]Struct pui_arena::slab::sparse::Slab

#[repr(transparent)]pub struct Slab<T>(pub Arena<T, (), Unversioned>);

a slab

Implementations

impl<T> Slab<T>[src]

pub const fn new() -> Self[src]

Create a new slab

pub fn is_empty(&self) -> bool[src]

pub fn len(&self) -> usize[src]

pub fn capacity(&self) -> usize[src]

pub fn reserve(&mut self, additional: usize)[src]

pub fn clear(&mut self)[src]

pub fn vacant_entry(&mut self) -> VacantEntry<'_, T>[src]

pub fn insert(&mut self, value: T) -> Key[src]

pub fn contains(&self, key: Key) -> bool[src]

pub fn remove(&mut self, key: Key) -> T[src]

pub fn try_remove(&mut self, key: Key) -> Option<T>[src]

pub fn delete(&mut self, key: Key) -> bool[src]

pub fn get(&self, key: Key) -> Option<&T>[src]

pub fn get_mut(&mut self, key: Key) -> Option<&mut T>[src]

pub unsafe fn get_unchecked(&self, index: usize) -> &T[src]

pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T[src]

pub fn delete_all(&mut self)[src]

pub fn retain<F: FnMut(&mut T) -> bool>(&mut self, f: F)[src]

pub fn keys(&self) -> Keys<'_, T>[src]

pub fn iter(&self) -> Iter<'_, T>[src]

pub fn iter_mut(&mut self) -> IterMut<'_, T>[src]

pub fn drain(&mut self) -> Drain<'_, T>[src]

pub fn drain_filter<F: FnMut(&mut T) -> bool>(
    &mut self,
    filter: F
) -> DrainFilter<'_, T, F>
[src]

pub fn entries(&self) -> Entries<'_, T>[src]

pub fn entries_mut(&mut self) -> EntriesMut<'_, T>[src]

pub fn into_entries(self) -> IntoEntries<T>[src]

Trait Implementations

impl<T: Clone> Clone for Slab<T>[src]

impl<T: Debug> Debug for Slab<T>[src]

impl<T> Default for Slab<T>[src]

impl<T> Index<usize> for Slab<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<usize> for Slab<T>[src]

impl<T> IntoIterator for Slab<T>[src]

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

type Item = T

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> Send for Slab<T> where
    T: Send
[src]

impl<T> Sync for Slab<T> where
    T: Sync
[src]

impl<T> Unpin for Slab<T> where
    T: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.