pub(crate) trait ExecutorTrait {
    // Required methods
    fn async_from<'a, F: IntoAsync + 'a>(
        &self,
        f: F
    ) -> AsyncResult<IoSource<F>>;
    fn spawn<F>(&self, f: F) -> TaskHandle<F::Output> 
       where F: Future + Send + 'static,
             F::Output: Send + 'static;
    fn spawn_blocking<F, R>(&self, f: F) -> TaskHandle<R> 
       where F: FnOnce() -> R + Send + 'static,
             R: Send + 'static;
    fn spawn_local<F>(&self, f: F) -> TaskHandle<F::Output> 
       where F: Future + 'static,
             F::Output: 'static;
    fn run_until<F: Future>(&self, f: F) -> AsyncResult<F::Output>;
}

Required Methods§

source

fn async_from<'a, F: IntoAsync + 'a>(&self, f: F) -> AsyncResult<IoSource<F>>

source

fn spawn<F>(&self, f: F) -> TaskHandle<F::Output>
where F: Future + Send + 'static, F::Output: Send + 'static,

source

fn spawn_blocking<F, R>(&self, f: F) -> TaskHandle<R>
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,

source

fn spawn_local<F>(&self, f: F) -> TaskHandle<F::Output>
where F: Future + 'static, F::Output: 'static,

source

fn run_until<F: Future>(&self, f: F) -> AsyncResult<F::Output>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<Re: Reactor + 'static> ExecutorTrait for Arc<RawExecutor<Re>>

source§

fn async_from<'a, F: IntoAsync + 'a>(&self, f: F) -> AsyncResult<IoSource<F>>

source§

fn spawn<F>(&self, f: F) -> TaskHandle<F::Output>
where F: Future + Send + 'static, F::Output: Send + 'static,

source§

fn spawn_local<F>(&self, f: F) -> TaskHandle<F::Output>
where F: Future + 'static, F::Output: 'static,

source§

fn spawn_blocking<F, R>(&self, f: F) -> TaskHandle<R>
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,

source§

fn run_until<F: Future>(&self, f: F) -> AsyncResult<F::Output>

Implementors§