Trait specs_mirror::StorageMutExt [−][src]
pub trait StorageMutExt<C: Mirrored>: StorageExt<C> { fn register_reader(&mut self) -> ReaderId<C::Event>; fn modify(
&mut self,
entity: Entity
) -> Option<(&mut C, &mut EventChannel<C::Event>)>; fn event_channel(&mut self) -> &mut EventChannel<C::Event>; }
Extension methods for Storage
to help read events from MirroredStorage
.
Required Methods
fn register_reader(&mut self) -> ReaderId<C::Event>
Register a new reader of insertion and removal events.
fn modify(
&mut self,
entity: Entity
) -> Option<(&mut C, &mut EventChannel<C::Event>)>
&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.
fn event_channel(&mut self) -> &mut EventChannel<C::Event>
Get a mutable reference to the event channel for update events.
Implementations on Foreign Types
impl<'a, C, S, D> StorageMutExt<C> for Storage<'a, C, D> where
C: Mirrored + Component<Storage = MirroredStorage<C, S>>,
S: UnprotectedStorage<C> + Any + Send + Sync,
D: DerefMut<Target = MaskedStorage<C>>,
[src]
impl<'a, C, S, D> StorageMutExt<C> for Storage<'a, C, D> where
C: Mirrored + Component<Storage = MirroredStorage<C, S>>,
S: UnprotectedStorage<C> + Any + Send + Sync,
D: DerefMut<Target = MaskedStorage<C>>,
fn register_reader(&mut self) -> ReaderId<C::Event>
[src]
fn register_reader(&mut self) -> ReaderId<C::Event>
fn modify(
&mut self,
entity: Entity
) -> Option<(&mut C, &mut EventChannel<C::Event>)>
[src]
fn modify(
&mut self,
entity: Entity
) -> Option<(&mut C, &mut EventChannel<C::Event>)>
fn event_channel(&mut self) -> &mut EventChannel<C::Event>
[src]
fn event_channel(&mut self) -> &mut EventChannel<C::Event>