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

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

Required Associated Types§

Required Methods§

source

fn spawn_func<F: FnOnce() -> T + Send + 'static>( &self, f: F ) -> Self::SpawnHandle

Object Safety§

This trait is not object safe.

Implementors§

source§

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

source§

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