Struct specs::storage::OccupiedEntry
[−]
[src]
pub struct OccupiedEntry<'a, 'b: 'a, T: 'a, D: '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
T: Component,
D: Deref<Target = MaskedStorage<T>>,
[src]
T: Component,
D: Deref<Target = MaskedStorage<T>>,
ⓘImportant traits for &'a mut Wpub fn get(&self) -> &T
[src]
ⓘImportant traits for &'a mut W
Get a reference to the component associated with the entity.
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
T: Component,
D: DerefMut<Target = MaskedStorage<T>>,
[src]
T: Component,
D: DerefMut<Target = MaskedStorage<T>>,
ⓘImportant traits for &'a mut Wpub fn get_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'a mut W
Get a mutable reference to the component associated with the entity.
ⓘImportant traits for &'a mut Wpub fn into_mut(self) -> &'a mut T
[src]
ⓘImportant traits for &'a mut W
Converts the OccupiedEntry
into a mutable reference bounded by
the storage's lifetime.
pub fn insert(&mut self, component: T) -> T
[src]
Inserts a value into the storage and returns the old one.
pub fn remove(self) -> T
[src]
Removes the component from the storage and returns it.
Trait Implementations
Auto Trait Implementations
impl<'a, 'b, T, D> Send for OccupiedEntry<'a, 'b, T, D> where
D: Send,
T: Send,
D: Send,
T: Send,
impl<'a, 'b, T, D> Sync for OccupiedEntry<'a, 'b, T, D> where
D: Sync,
T: Sync,
D: Sync,
T: Sync,