pub trait GenericWriteStorage {
    type Component: Component;

    fn get_mut(&mut self, entity: Entity) -> Option<&'_ mut Self::Component>;
    fn get_mut_or_default(
        &mut self,
        entity: Entity
    ) -> Option<&'_ mut Self::Component>
    where
        Self::Component: Default
; fn insert(
        &mut self,
        entity: Entity,
        comp: Self::Component
    ) -> InsertResult<Self::Component>; fn remove(&mut self, entity: Entity); fn _private() -> Seal; }
Expand description

Provides generic write access to WriteStorage, both as a value and a mutable reference.

Required Associated Types

The component type of the storage

Required Methods

Get mutable access to an Entitys component

Get mutable access to an Entitys component. If the component does not exist, it is automatically created using Default::default().

Returns None if the entity is dead.

Insert a component for an Entity

Remove the component for an Entity

Private function to seal the trait

Implementors