Struct amethyst::ecs::prelude::NullStorage [−]
pub struct NullStorage<T>(_);
A null storage type, used for cases where the component doesn't contain any data and instead works as a simple flag.
Trait Implementations
impl<T> Default for NullStorage<T> where
T: Default,
impl<T> Default for NullStorage<T> where
T: Default, fn default() -> NullStorage<T>
fn default() -> NullStorage<T>Returns the "default value" for a type. Read more
impl<T> DistinctStorage for NullStorage<T>
impl<T> DistinctStorage for NullStorage<T>This is safe because you cannot mutate ZSTs.
impl<T> UnprotectedStorage<T> for NullStorage<T> where
T: Default,
impl<T> UnprotectedStorage<T> for NullStorage<T> where
T: Default, unsafe fn clean<B>(&mut self, _has: B) where
B: BitSetLike,
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. Read more
ⓘImportant traits for &'a mut Runsafe fn get(&self, u32) -> &T
ⓘImportant traits for &'a mut R
unsafe fn get(&self, u32) -> &TTries reading the data associated with an Index. This is unsafe because the external set used to protect this storage is absent. Read more
ⓘImportant traits for &'a mut Runsafe fn get_mut(&mut self, u32) -> &mut T
ⓘImportant traits for &'a mut R
unsafe fn get_mut(&mut self, u32) -> &mut TTries mutating the data associated with an Index. This is unsafe because the external set used to protect this storage is absent. Read more
unsafe fn insert(&mut self, u32, T)
unsafe fn insert(&mut self, u32, T)Inserts new data for a given Index.
unsafe fn remove(&mut self, u32) -> T
unsafe fn remove(&mut self, u32) -> TRemoves the data associated with an Index.
unsafe fn drop(&mut self, id: u32)
unsafe fn drop(&mut self, id: u32)Drops the data associated with an Index.
Auto Trait Implementations
impl<T> Send for NullStorage<T> where
T: Send,
impl<T> Send for NullStorage<T> where
T: Send, impl<T> Sync for NullStorage<T> where
T: Sync,
impl<T> Sync for NullStorage<T> where
T: Sync,