pub trait GenericWriteStorage {
type Component: Component;
// Required methods
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;
}Expand description
Provides generic write access to WriteStorage, both as a value and a mutable reference.
Required Associated Types§
Required Methods§
Sourcefn get_mut(&mut self, entity: Entity) -> Option<&mut Self::Component>
fn get_mut(&mut self, entity: Entity) -> Option<&mut Self::Component>
Get mutable access to an Entitys component
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.