Trait async_scoped::spawner::FuncSpawner
source · 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§
type FutureOutput
type SpawnHandle: Future<Output = Self::FutureOutput> + Send
Required Methods§
fn spawn_func<F: FnOnce() -> T + Send + 'static>( &self, f: F ) -> Self::SpawnHandle
Object Safety§
This trait is not object safe.