Spawn

Trait Spawn 

Source
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§

Source

fn spawn(&self, fut: Pin<Box<dyn Send + Future<Output = ()> + 'static>>)

Spawn a future object

Source

fn spawn_blocking(&self, task: Box<dyn Send + FnOnce() + 'static>)

Spawn a blocking task object

Implementors§