pub struct OnSpawn(pub LifecycleCallback);Expand description
The callback that runs right after the entity is spawned.
Tuple Fields§
§0: LifecycleCallbackThe callback, run at the structural change.
Implementations§
Trait Implementations§
Source§impl Lifecycle for OnSpawn
impl Lifecycle for OnSpawn
Source§fn take(&mut self) -> LifecycleCallback
fn take(&mut self) -> LifecycleCallback
Take the callback out, leaving a placeholder in its place.
Source§fn restore(&mut self, callback: LifecycleCallback)
fn restore(&mut self, callback: LifecycleCallback)
Put a callback taken by
Lifecycle::take back.impl Sealed for OnSpawn
Auto Trait Implementations§
impl !RefUnwindSafe for OnSpawn
impl !Send for OnSpawn
impl !Sync for OnSpawn
impl !UnwindSafe for OnSpawn
impl Forget for OnSpawn
impl Freeze for OnSpawn
impl Unpin for OnSpawn
impl UnsafeUnpin for OnSpawn
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