pub trait Spawn {
// Required methods
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§
Sourcefn spawn_blocking(&self, task: Box<dyn Send + FnOnce() + 'static>)
fn spawn_blocking(&self, task: Box<dyn Send + FnOnce() + 'static>)
Spawn a blocking task object