Trait async_skipdb::AsyncSpawner
source · pub trait AsyncSpawner: Yielder + Copy + Send + Sync + 'static {
type JoinHandle<F: Send + 'static>: Detach + Future + Send + Sync + 'static;
// Required method
fn spawn<F>(future: F) -> Self::JoinHandle<<F as Future>::Output>
where <F as Future>::Output: Send + 'static,
F: Future + Send + 'static;
// Provided method
fn spawn_detach<F>(future: F)
where <F as Future>::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.