pub trait Spawner {
// Required methods
fn spawn(&mut self, fut: BoxFuture<'static, ()>) -> Result<()>;
fn spawn_local(&mut self, fut: LocalBoxFuture<'static, ()>) -> Result<()>;
fn block(&mut self, f: Box<dyn FnOnce() + Send + 'static>) -> Result<()>;
}
Expand description
The value for spawning cases.
Required Methods§
Sourcefn spawn_local(&mut self, fut: LocalBoxFuture<'static, ()>) -> Result<()>
fn spawn_local(&mut self, fut: LocalBoxFuture<'static, ()>) -> Result<()>
Spawn a task to execute a case onto the current thread.