pub struct OnDespawn(pub LifecycleCallback);Expand description
The callback that runs right before the entity is despawned.
Tuple Fields§
§0: LifecycleCallbackThe callback, run at the structural change.
Implementations§
Trait Implementations§
Source§impl Lifecycle for OnDespawn
impl Lifecycle for OnDespawn
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 OnDespawn
Auto Trait Implementations§
impl !RefUnwindSafe for OnDespawn
impl !Send for OnDespawn
impl !Sync for OnDespawn
impl !UnwindSafe for OnDespawn
impl Forget for OnDespawn
impl Freeze for OnDespawn
impl Unpin for OnDespawn
impl UnsafeUnpin for OnDespawn
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