Function bevy_defer::spawn_scoped

source ·
pub fn spawn_scoped<T: 'static>(
    fut: impl Future<Output = T> + 'static,
) -> impl Future<Output = T>
👎Deprecated: Use AsyncWorldMut::spawn_scoped instead.
Expand description

Spawn a bevy_defer compatible future with a handle.

§Handle

The handle can be used to obtain the result, if dropped, the associated future will be dropped by the executor.

§Panics

If used outside a bevy_defer future.