[][src]Struct ico_memory::mem::IndexedDataStore

pub struct IndexedDataStore<'a, T> { /* fields omitted */ }

Methods

impl<'a, T> IndexedDataStore<'a, T>[src]

pub const unsafe fn from_raw(
    data: &'a *mut MaybeUninit<IndexedData<T>>,
    capacity: u32
) -> IndexedDataStore<'a, T>
[src]

pub fn high_water_mark(&self) -> u32[src]

How much of the buffer has ever been used.

pub fn active(&self) -> u32[src]

How many objects are currently stored and accessible.

pub fn destroyed(&self) -> u32[src]

How many objects are currently stored but marked destroyed.

pub fn available(&self) -> u32[src]

How much free space. Capcity - (active + destroyed).

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

Total fixed capacity.

pub fn retain(&'a self, handle: IndexedHandle) -> Nullable<IndexedRef<'a, T>>[src]

Retain a strong reference. If no reference exists returns None, otherwise, this increments the reference count and returns the reference.
It is up to the user to manually release() the returned reference when they are finished.

pub unsafe fn get(&'a self, reference: &'a IndexedRef<T>) -> &'a mut T[src]

It is imperative users not hold these references

pub fn clone(&'a self, reference: &'a IndexedRef<T>) -> IndexedRef<T>[src]

pub fn release(&'a self, reference: IndexedRef<T>)[src]

Release a strong reference. This decrements the reference count.

pub fn store(&self, value: T) -> IndexedHandle[src]

pub fn free(&self, handle: IndexedHandle) -> bool[src]

Trait Implementations

impl<'a, T> Drop for IndexedDataStore<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !Send for IndexedDataStore<'a, T>

impl<'a, T> Unpin for IndexedDataStore<'a, T>

impl<'a, T> !Sync for IndexedDataStore<'a, T>

impl<'a, T> !UnwindSafe for IndexedDataStore<'a, T>

impl<'a, T> !RefUnwindSafe for IndexedDataStore<'a, T>

Blanket Implementations

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

impl<T> From<T> for T[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.

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

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

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