[][src]Trait executor_trait::Executor

pub trait Executor {
    pub fn spawn<T: Send + 'static>(
        &self,
        f: Pin<Box<dyn Future<Output = T> + Send>>
    ) -> Box<dyn Task<T>>; }

A common interface for spawning futures on top of an executor

Required methods

pub fn spawn<T: Send + 'static>(
    &self,
    f: Pin<Box<dyn Future<Output = T> + Send>>
) -> Box<dyn Task<T>>
[src]

Spawn a future and return a handle to get its result on completion.

Dropping the handle will cancel the future. You can call detach() to let it run without waiting for its completion.

Loading content...

Implementors

impl<E: Deref> Executor for E where
    E::Target: Executor
[src]

Loading content...