Trait mobc::runtime::Executor

source ·
pub trait Executor: Send + Sync + 'static + Clone {
    // Required method
    fn spawn(&mut self, future: Pin<Box<dyn Future<Output = ()> + Send>>);
}
Expand description

A value that executes futures. see tokio::Executor

Required Methods§

source

fn spawn(&mut self, future: Pin<Box<dyn Future<Output = ()> + Send>>)

Spawns a future object to run on this executor.

future is passed to the executor, which will begin running it. The future may run on the current thread or another thread at the discretion of the Executor implementation.

Object Safety§

This trait is not object safe.

Implementors§