pub unsafe trait Spawner<T> {
    type FutureOutput;
    type SpawnHandle: Future<Output = Self::FutureOutput> + Send;

    // Required method
    fn spawn<F: Future<Output = T> + Send + 'static>(
        &self,
        f: F
    ) -> Self::SpawnHandle;
}

Required Associated Types§

Required Methods§

source

fn spawn<F: Future<Output = T> + Send + 'static>( &self, f: F ) -> Self::SpawnHandle

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Send + 'static> Spawner<T> for AsyncStd

source§

impl<T: Send + 'static> Spawner<T> for Tokio