Struct bevy_cobweb::react::DespawnTrigger
source · pub struct DespawnTrigger(/* private fields */);
Expand description
Reaction trigger for despawns.
- Registration does nothing if the entity does not exist.
Note that DespawnTrigger
does not implement EntityTrigger
because EntityWorldReactor
only runs for entities
that exist.
Trait Implementations§
source§impl Clone for DespawnTrigger
impl Clone for DespawnTrigger
source§fn clone(&self) -> DespawnTrigger
fn clone(&self) -> DespawnTrigger
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 ReactionTrigger for DespawnTrigger
impl ReactionTrigger for DespawnTrigger
source§fn reactor_type(&self) -> ReactorType
fn reactor_type(&self) -> ReactorType
Gets the trigger’s
ReactorType
.source§fn register(&self, commands: &mut Commands<'_, '_>, handle: &ReactorHandle)
fn register(&self, commands: &mut Commands<'_, '_>, handle: &ReactorHandle)
Register a trigger with
ReactCommands
.impl Copy for DespawnTrigger
Auto Trait Implementations§
impl Freeze for DespawnTrigger
impl RefUnwindSafe for DespawnTrigger
impl Send for DespawnTrigger
impl Sync for DespawnTrigger
impl Unpin for DespawnTrigger
impl UnwindSafe for DespawnTrigger
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R> ReactionTriggerBundle for Rwhere
R: ReactionTrigger,
impl<R> ReactionTriggerBundle for Rwhere
R: ReactionTrigger,
source§fn collect_reactor_types(self, func: &mut impl FnMut(ReactorType))
fn collect_reactor_types(self, func: &mut impl FnMut(ReactorType))
Traverses reactor types in the bundle.
source§fn register_triggers(
self,
commands: &mut Commands<'_, '_>,
handle: &ReactorHandle,
)
fn register_triggers( self, commands: &mut Commands<'_, '_>, handle: &ReactorHandle, )
Registers reactors and passes the reactor types to the injected function.