Skip to main content

AsyncRuntime

Trait AsyncRuntime 

Source
pub trait AsyncRuntime:
    AsyncExec
    + AsyncIO
    + AsyncTime { }
Expand description

A marker trait that combines all the core async runtime capabilities, including AsyncExec, AsyncIO, and AsyncTime. It serves as a convenient way to specify that a type provides all the core async runtime functionality.

You can write your own trait by inheriting AsyncRuntime or any other trait, to provide extra functions along with the runtime object. There’s an blanket trait to auto impl AsyncRuntime on anything that is Deref<Target> to an AsyncRuntime.

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§

Source§

impl<F: Deref<Target = T> + Send + Sync + 'static, T: AsyncRuntime> AsyncRuntime for F