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§
type FutureOutput
type SpawnHandle: Future<Output = Self::FutureOutput> + Send
Required Methods§
fn spawn<F: Future<Output = T> + Send + 'static>( &self, f: F, ) -> Self::SpawnHandle
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.