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§

source

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.

Implementors§

source§

impl<T, Out> LocalSpawnHandleExt<Out> for Twhere T: LocalSpawnHandle<Out> + ?Sized, Out: 'static,