Executor

Trait Executor 

Source
pub trait Executor {
    type Handle<T: Send + 'static>: Handle<T>;

    // Required method
    fn spawn<T, F>(future: F) -> Self::Handle<T>
       where T: Send + 'static,
             F: Future<Output = T> + Send + 'static;
}

Required Associated Types§

Source

type Handle<T: Send + 'static>: Handle<T>

Required Methods§

Source

fn spawn<T, F>(future: F) -> Self::Handle<T>
where T: Send + 'static, F: Future<Output = T> + Send + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§