[−]Struct oxygengine::prelude::storage::OccupiedEntry
An entry to a storage which has a component associated to the entity.
Implementations
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
D: Deref<Target = MaskedStorage<T>>,
T: Component,
D: Deref<Target = MaskedStorage<T>>,
T: Component,
impl<'a, 'b, T, D> OccupiedEntry<'a, 'b, T, D> where
D: DerefMut<Target = MaskedStorage<T>>,
T: Component,
D: DerefMut<Target = MaskedStorage<T>>,
T: Component,
pub fn get_mut(&mut self) -> &mut T
Get a mutable reference to the component associated with the entity.
pub fn into_mut(self) -> &'a mut T
Converts the OccupiedEntry
into a mutable reference bounded by
the storage's lifetime.
pub fn insert(&mut self, component: T) -> T
Inserts a value into the storage and returns the old one.
pub fn remove(self) -> T
Removes the component from the storage and returns it.
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>
impl<'a, 'b, T, D> !Sync for OccupiedEntry<'a, 'b, T, D>
impl<'a, 'b, T, D> Unpin for OccupiedEntry<'a, 'b, T, D> where
'b: 'a,
'b: 'a,
impl<'a, 'b, T, D> !UnwindSafe for OccupiedEntry<'a, 'b, T, D>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
T: Any,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,