pub trait Runtime {
    fn spawn<F>(&self, future: F) -> JoinHandle<F::Output>
    where
        F: Future + Send + 'static,
        F::Output: Send + 'static
; }
Expand description

This trait provides a mockable facade for tokio::task::spawn.

Required Methods

Spawn a future on a new task managed by an asynchronous runtime, and return a handle that can be used to await completion of that task.

Implementors