Struct rafx_base::slab::DropSlab[][src]

pub struct DropSlab<T> { /* fields omitted */ }

Wraps a RawSlab with reference counting handles. When the handle is dropped it sends a message to the slab. We process these messages to remove old elements

Implementations

impl<T> DropSlab<T>[src]

pub fn new() -> Self[src]

Create an empty RawSlab

pub fn with_capacity(capacity: SlabIndexT) -> Self[src]

Create an empty but presized RawSlab

pub fn process_drops(&mut self)[src]

pub fn allocate(&mut self, value: T) -> DropSlabKey<T>[src]

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

pub fn get_raw(&self, raw_slab_key: RawSlabKey<T>) -> Option<&T>[src]

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

pub fn get_raw_mut(&mut self, raw_slab_key: RawSlabKey<T>) -> Option<&mut T>[src]

pub fn iter_values(&self) -> impl Iterator<Item = &T>[src]

pub fn iter_values_mut(&mut self) -> impl Iterator<Item = &mut T>[src]

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

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

Trait Implementations

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

Auto Trait Implementations

impl<T> RefUnwindSafe for DropSlab<T> where
    T: RefUnwindSafe

impl<T> Send for DropSlab<T> where
    T: Send

impl<T> Sync for DropSlab<T> where
    T: Send + Sync

impl<T> Unpin for DropSlab<T> where
    T: Unpin

impl<T> UnwindSafe for DropSlab<T> where
    T: UnwindSafe

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

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

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

impl<T> Resource for T where
    T: Downcast + Send + Sync
[src]

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.