pub trait TaskSpawner:
Send
+ Sync
+ 'static {
// Required method
fn spawn(&self, future: Pin<Box<dyn Future<Output = ()> + Send>>);
}Expand description
A trait for spawning a future onto an asynchronous runtime.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl TaskSpawner for TokioSpawner
Available on crate feature
tokio only.