pub fn spawn_unpin(fut: impl Future<Output = ()> + Send + Unpin + 'static)
Expand description

Creates a new task to execute fut and schedules it for immediate execution.

Returns immediately.

Note that fut must be Unpin. You can use std::boxed::Box::pin to make it Unpin. The spawn function does this for you. Or use pin_utils::pin_mut to do it with unsafe code that does not allocate memory.

Panics

Panics if the caller is not running on an Executor.