pub trait SignalTask:
Send
+ Sync
+ 'static {
// Required method
fn register_task(self: Box<Self>, world: &mut World) -> SignalHandle;
}Expand description
A type-erased signal that can be managed as a free-floating “task”.
This trait enables Builder::hold_tasks to accept signals that haven’t
been registered yet, deferring their registration until the entity is spawned.
Use the .task() method to convert a Signal,
SignalVec, or SignalMap into a SignalTask.
Required Methods§
Sourcefn register_task(self: Box<Self>, world: &mut World) -> SignalHandle
fn register_task(self: Box<Self>, world: &mut World) -> SignalHandle
Register this signal task with the world and return its handle.