Struct amethyst::ecs::prelude::VecStorage [−]
pub struct VecStorage<T>(_);
Vector storage. Uses a simple Vec. Supposed to have maximum
performance for the components mostly present in entities.
Trait Implementations
impl<T> Default for VecStorage<T>
impl<T> Default for VecStorage<T>fn default() -> VecStorage<T>
fn default() -> VecStorage<T>Returns the "default value" for a type. Read more
impl<T> DistinctStorage for VecStorage<T>
impl<T> DistinctStorage for VecStorage<T>impl<T> UnprotectedStorage<T> for VecStorage<T>
impl<T> UnprotectedStorage<T> for VecStorage<T>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, id: u32) -> &T
ⓘImportant traits for &'a mut R
unsafe fn get(&self, id: 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, id: u32) -> &mut T
ⓘImportant traits for &'a mut R
unsafe fn get_mut(&mut self, id: 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, id: u32, v: T)
unsafe fn insert(&mut self, id: u32, v: T)Inserts new data for a given Index.
unsafe fn remove(&mut self, id: u32) -> T
unsafe fn remove(&mut self, id: 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 VecStorage<T> where
T: Send,
impl<T> Send for VecStorage<T> where
T: Send, impl<T> Sync for VecStorage<T> where
T: Sync,
impl<T> Sync for VecStorage<T> where
T: Sync,