pub struct Spawn(pub EntityId);Expand description
An Event which signals the creation of an entity. Contains the
EntityId of the new entity.
The event by itself has no additional effects, and cannot be used to spawn
new entities. Use World::spawn or Sender::spawn instead.
Tuple Fields§
§0: EntityIdTrait Implementations§
source§impl Ord for Spawn
impl Ord for Spawn
source§impl PartialEq for Spawn
impl PartialEq for Spawn
source§impl PartialOrd for Spawn
impl PartialOrd for Spawn
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Spawn
impl Eq for Spawn
impl StructuralPartialEq for Spawn
Auto Trait Implementations§
impl RefUnwindSafe for Spawn
impl Send for Spawn
impl Sync for Spawn
impl Unpin for Spawn
impl UnwindSafe for Spawn
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<E> EventSet for Ewhere
E: Event,
impl<E> EventSet for Ewhere
E: Event,
§type EventIndices = u32
type EventIndices = u32
The set of event indices.
source§fn new_state(world: &mut World) -> <E as EventSet>::EventIndices
fn new_state(world: &mut World) -> <E as EventSet>::EventIndices
Creates the set of event indices.
source§fn event_idx_of<F>(state: &<E as EventSet>::EventIndices) -> Option<u32>where
F: Event,
fn event_idx_of<F>(state: &<E as EventSet>::EventIndices) -> Option<u32>where
F: Event,
Gets an event index from the set. Returns
None if event E
is not in the set.source§fn for_each_idx<F>(state: &<E as EventSet>::EventIndices, f: F)
fn for_each_idx<F>(state: &<E as EventSet>::EventIndices, f: F)
Run a function on each event index in the set.