Trait mssf_core::runtime::executor::Executor

source ·
pub trait Executor:
    Clone
    + Sync
    + Send
    + 'static {
    // Required methods
    fn spawn<F>(&self, future: F)
       where F: Future + Send + 'static;
    fn block_on<F: Future>(&self, future: F) -> F::Output;

    // Provided method
    fn run_until_ctrl_c(&self) { ... }
}

Required Methods§

source

fn spawn<F>(&self, future: F)
where F: Future + Send + 'static,

source

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

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§