pub trait Executor {
    // Required methods
    fn new() -> Self;
    fn block_on<F: Future>(&mut self, future: F) -> F::Output;
}
Expand description

Generic executor.

Required Methods§

source

fn new() -> Self

Create the implementor itself.

source

fn block_on<F: Future>(&mut self, future: F) -> F::Output

Spawns a future object to run synchronously or asynchronously depending on the specific executor.

Implementations on Foreign Types§

source§

impl Executor for Runtime

source§

fn new() -> Self

source§

fn block_on<F: Future>(&mut self, future: F) -> F::Output

Implementors§