[][src]Trait oxygengine_core::ecs::storage::UnprotectedStorage

pub trait UnprotectedStorage<T>: TryDefault {
    unsafe fn clean<B>(&mut self, has: B)
    where
        B: BitSetLike
;
unsafe fn get(&self, id: u32) -> &T;
unsafe fn get_mut(&mut self, id: u32) -> &mut T;
unsafe fn insert(&mut self, id: u32, value: T);
unsafe fn remove(&mut self, id: u32) -> T; unsafe fn drop(&mut self, id: u32) { ... } }

Used by the framework to quickly join components.

Required methods

unsafe fn clean<B>(&mut self, has: B) where
    B: BitSetLike, 

Clean the storage given a bitset with bits set for valid indices. Allows us to safely drop the storage.

unsafe fn get(&self, id: u32) -> &T

Tries reading the data associated with an Index. This is unsafe because the external set used to protect this storage is absent.

unsafe fn get_mut(&mut self, id: u32) -> &mut T

Tries mutating the data associated with an Index. This is unsafe because the external set used to protect this storage is absent.

unsafe fn insert(&mut self, id: u32, value: T)

Inserts new data for a given Index.

unsafe fn remove(&mut self, id: u32) -> T

Removes the data associated with an Index.

Loading content...

Provided methods

unsafe fn drop(&mut self, id: u32)

Drops the data associated with an Index.

Loading content...

Implementors

impl<C, T> UnprotectedStorage<C> for FlaggedStorage<C, T> where
    C: Component,
    T: UnprotectedStorage<C>, 
[src]

impl<T> UnprotectedStorage<T> for BTreeStorage<T>[src]

impl<T> UnprotectedStorage<T> for DenseVecStorage<T>[src]

impl<T> UnprotectedStorage<T> for HashMapStorage<T>[src]

impl<T> UnprotectedStorage<T> for NullStorage<T> where
    T: Default
[src]

impl<T> UnprotectedStorage<T> for VecStorage<T>[src]

Loading content...