Skip to main content

Adapter

Trait Adapter 

Source
pub trait Adapter: Sized + Deref<Target = Runtime> {
    // Required methods
    fn new(runtime: Runtime) -> Result<Self>;
    async fn wait(&self, timeout: Option<Duration>) -> Result<()>;
    fn clear(&self) -> Result<()>;
}
Expand description

Adapter trait for different runtimes.

Required Methods§

Source

fn new(runtime: Runtime) -> Result<Self>

Creates a new adapter with the given runtime.

Source

async fn wait(&self, timeout: Option<Duration>) -> Result<()>

Waits for the runtime to be ready, with an optional timeout.

Source

fn clear(&self) -> Result<()>

Clears the runtime’s state after waiting.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§