Struct specs::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]

[src]

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]

[src]

Get a mutable reference to the component associated with the entity.

[src]

Converts the OccupiedEntry into a mutable reference bounded by the storage's lifetime.

[src]

Inserts a value into the storage and returns the old one.

[src]

Removes the component from the storage and returns it.