Struct amethyst::ecs::storage::OccupiedEntry [−]
pub struct OccupiedEntry<'a, 'b, T, D> where
'b: 'a,
D: 'a,
T: 'a, { /* fields omitted */ }An entry to a storage which has a component associated to the entity.
Methods
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
D: Deref<Target = MaskedStorage<T>>,
T: Component,
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
D: Deref<Target = MaskedStorage<T>>,
T: Component, ⓘImportant traits for &'a mut Rpub fn get(&self) -> &T
ⓘImportant traits for &'a mut R
pub fn get(&self) -> &TGet a reference to the component associated with the entity.
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
D: DerefMut<Target = MaskedStorage<T>>,
T: Component,
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
D: DerefMut<Target = MaskedStorage<T>>,
T: Component, ⓘImportant traits for &'a mut Rpub fn get_mut(&mut self) -> &mut T
ⓘImportant traits for &'a mut R
pub fn get_mut(&mut self) -> &mut TGet a mutable reference to the component associated with the entity.
ⓘImportant traits for &'a mut Rpub fn into_mut(self) -> &'a mut T
ⓘImportant traits for &'a mut R
pub fn into_mut(self) -> &'a mut TConverts the OccupiedEntry into a mutable reference bounded by
the storage's lifetime.
pub fn insert(&mut self, component: T) -> T
pub fn insert(&mut self, component: T) -> TInserts a value into the storage and returns the old one.
pub fn remove(self) -> T
pub fn remove(self) -> TRemoves the component from the storage and returns it.
Auto Trait Implementations
impl<'a, 'b, T, D> Send for OccupiedEntry<'a, 'b, T, D> where
D: Send,
T: Send,
impl<'a, 'b, T, D> Send for OccupiedEntry<'a, 'b, T, D> where
D: Send,
T: Send, impl<'a, 'b, T, D> Sync for OccupiedEntry<'a, 'b, T, D> where
D: Sync,
T: Sync,
impl<'a, 'b, T, D> Sync for OccupiedEntry<'a, 'b, T, D> where
D: Sync,
T: Sync,