Struct specs::storage::OccupiedEntry
source · [−]pub struct OccupiedEntry<'a, 'b: 'a, T: 'a, D: 'a> { /* private fields */ }
Expand description
An entry to a storage which has a component associated to the entity.
Implementations
sourceimpl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
T: Component,
D: Deref<Target = MaskedStorage<T>>,
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
T: Component,
D: Deref<Target = MaskedStorage<T>>,
sourceimpl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
T: Component,
D: DerefMut<Target = MaskedStorage<T>>,
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
T: Component,
D: DerefMut<Target = MaskedStorage<T>>,
sourcepub fn get_mut(&mut self) -> &'_ mut T
pub fn get_mut(&mut self) -> &'_ mut T
Get a mutable reference to the component associated with the entity.
sourcepub fn into_mut(self) -> &'a mut T
pub fn into_mut(self) -> &'a mut T
Converts the OccupiedEntry
into a mutable reference bounded by
the storage’s lifetime.
Auto Trait Implementations
impl<'a, 'b, T, D> !RefUnwindSafe for OccupiedEntry<'a, 'b, T, D>
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> Unpin for OccupiedEntry<'a, 'b, T, D> where
'b: 'a,
impl<'a, 'b, T, D> !UnwindSafe for OccupiedEntry<'a, 'b, T, D>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more