#[repr(transparent)]pub struct Spawn(pub EntityId);
Expand description
A GlobalEvent
which signals the creation of an entity. Contains the
EntityId
of the new entity, which may or may not exist by the time this
event is observed.
Note that the event by itself cannot be used to spawn new entities. Use
World::spawn
or Sender::spawn
instead.
Tuple Fields§
§0: EntityId
Trait Implementations§
Source§impl Event for Spawn
impl Event for Spawn
Source§type EventIdx = GlobalEventIdx
type EventIdx = GlobalEventIdx
Either
GlobalEventIdx
or TargetedEventIdx
. This indicates if the
event is global or targeted.Source§impl Ord for Spawn
impl Ord for Spawn
Source§impl PartialOrd for Spawn
impl PartialOrd for Spawn
impl Copy for Spawn
impl Eq for Spawn
impl StructuralPartialEq for Spawn
Auto Trait Implementations§
impl Freeze for Spawn
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.