Trait agnostic_lite::AsyncSpawner
source · pub trait AsyncSpawner: Copy + Send + Sync + 'static {
type JoinHandle<F>: Future + Send + Sync + 'static
where F: Send + 'static;
// Required method
fn spawn<F>(future: F) -> Self::JoinHandle<F::Output>
where F::Output: Send + 'static,
F: Future + Send + 'static;
// Provided method
fn spawn_detach<F>(future: F)
where F::Output: Send + 'static,
F: Future + Send + 'static { ... }
}Expand description
A spawner trait for spawning futures.
Required Associated Types§
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.