pub trait Spawner:
Send
+ Sync
+ 'static {
// Required method
fn spawn(&self, fut: BoxFuture);
}Expand description
An executor hook that drives the futures produced by async exports.
Implemented for any Fn(BoxFuture) + Send + Sync + 'static, so a closure
that forwards to a runtime handle is enough.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".