Trait amethyst::ecs::storage::GenericWriteStorage [−]
pub trait GenericWriteStorage {
type Component: Component;
fn get_mut(&mut self, entity: Entity) -> Option<&mut Self::Component>;
fn insert(
&mut self,
entity: Entity,
comp: Self::Component
) -> Result<Option<Self::Component>, Error>;
fn remove(&mut self, entity: Entity);
fn _private() -> Seal;
}Provides generic write access to WriteStorage, both as a value and a mutable reference.
Associated Types
Required Methods
fn get_mut(&mut self, entity: Entity) -> Option<&mut Self::Component>
Get mutable access to an Entitys component
fn insert(
&mut self,
entity: Entity,
comp: Self::Component
) -> Result<Option<Self::Component>, Error>
&mut self,
entity: Entity,
comp: Self::Component
) -> Result<Option<Self::Component>, Error>
Insert a component for an Entity
fn remove(&mut self, entity: Entity)
Remove the component for an Entity
fn _private() -> Seal
Private function to seal the trait
Implementors
impl<'a, T> GenericWriteStorage for Storage<'a, T, FetchMut<'a, MaskedStorage<T>>> where
T: Component, type Component = T;impl<'a, 'b, T> GenericWriteStorage for &'b mut Storage<'a, T, FetchMut<'a, MaskedStorage<T>>> where
'a: 'b,
T: Component, type Component = T;