Trait async_executors::iface::LocalSpawnHandleExt
source · [−]pub trait LocalSpawnHandleExt<Out: 'static>: LocalSpawnHandle<Out> {
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
fn 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.