pub trait LocalSpawnHandleExt<Out: 'static>: LocalSpawnHandle<Out> {
// Required method
fn spawn_handle_local(
&self,
future: impl Future<Output = Out> + 'static,
) -> Result<JoinHandle<Out>, SpawnError>;
}
Expand description
Lets you spawn a !Send
future and get a JoinHandle
to await the output of a future.
Required Methods§
Sourcefn spawn_handle_local(
&self,
future: impl Future<Output = Out> + 'static,
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_local( &self, future: impl Future<Output = Out> + 'static, ) -> Result<JoinHandle<Out>, SpawnError>
Convenience trait for passing in a generic future to LocalSpawnHandle
. Much akin to LocalSpawn
and LocalSpawnExt
in the
futures library.
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.