pub trait Spawn {
fn spawn(&self, fut: Pin<Box<dyn Send + Future<Output = ()> + 'static>>);
fn spawn_blocking(&self, task: Box<dyn Send + FnOnce() + 'static>);
}
Expand description
Executor constraint.
Required methods
fn spawn_blocking(&self, task: Box<dyn Send + FnOnce() + 'static>)
fn spawn_blocking(&self, task: Box<dyn Send + FnOnce() + 'static>)
Spawn a blocking task object