pub trait SpawnLocalExt: Runtime {
// Required method
fn spawn_local<F>(fut: F) -> Self::JoinHandle
where F: Future<Output = ()> + 'static;
}
Expand description
Extension trait for async/await runtimes that support spawning local tasks
Required Methods§
Sourcefn spawn_local<F>(fut: F) -> Self::JoinHandle
fn spawn_local<F>(fut: F) -> Self::JoinHandle
Spawn a !Send future onto this runtime’s event loop
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.