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.

Object Safety§

This trait is not object safe.

Implementors§