pub enum ComponentEvent {
Inserted(Index),
Modified(Index),
Removed(Index),
}
Expand description
Component storage events received from a FlaggedStorage
or any storage
that implements Tracked
.
Variants§
Inserted(Index)
An insertion event, note that a modification event will be triggered if the entity already had a component and had a new one inserted.
Modified(Index)
A modification event, this will be sent any time a component is accessed
mutably so be careful with joins over &mut storages
as it could
potentially flag all of them.
Removed(Index)
A removal event.
Trait Implementations§
Source§impl Clone for ComponentEvent
impl Clone for ComponentEvent
Source§fn clone(&self) -> ComponentEvent
fn clone(&self) -> ComponentEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ComponentEvent
impl Debug for ComponentEvent
Source§impl PartialEq for ComponentEvent
impl PartialEq for ComponentEvent
impl Copy for ComponentEvent
impl Eq for ComponentEvent
impl StructuralPartialEq for ComponentEvent
Auto Trait Implementations§
impl Freeze for ComponentEvent
impl RefUnwindSafe for ComponentEvent
impl Send for ComponentEvent
impl Sync for ComponentEvent
impl Unpin for ComponentEvent
impl UnwindSafe for ComponentEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more