Runtime

Trait Runtime 

Source
pub trait Runtime {
    // Required method
    fn block_on<F>(&self, future: F) -> F::Output
       where F: Future;
}
Expand description

The runtime trait that all runtimes must implement.

Required Methods§

Source

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

Runs the given future to completion on the runtime.

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§