pub trait StorageMutExt<C: Mirrored>: StorageExt<C> {
// Required methods
fn modify(
&mut self,
entity: Entity,
) -> Option<(&mut C, &mut EventChannel<C::Event>)>;
fn event_channel(&mut self) -> &mut EventChannel<C::Event>;
// Provided method
fn register_reader(&mut self) -> ReaderId<C::Event> { ... }
}
Expand description
Extension methods for Storage
to help read events from MirroredStorage
.
Required Methods§
Sourcefn modify(
&mut self,
entity: Entity,
) -> Option<(&mut C, &mut EventChannel<C::Event>)>
fn modify( &mut self, entity: Entity, ) -> Option<(&mut C, &mut EventChannel<C::Event>)>
Get a mutable reference to the component and the event channel for update events.
Sourcefn event_channel(&mut self) -> &mut EventChannel<C::Event>
fn event_channel(&mut self) -> &mut EventChannel<C::Event>
Get a mutable reference to the event channel for update events.
Provided Methods§
Sourcefn register_reader(&mut self) -> ReaderId<C::Event>
fn register_reader(&mut self) -> ReaderId<C::Event>
Register a new reader of insertion and removal events.