pal_async::io_pool

Trait IoBackend

Source
pub trait IoBackend: Send + Sync {
    // Required methods
    fn name() -> &'static str;
    fn run<Fut: Future>(self: &Arc<Self>, fut: Fut) -> Fut::Output;
}
Expand description

Trait implemented by IO backends.

Required Methods§

Source

fn name() -> &'static str

The name of the backend.

Source

fn run<Fut: Future>(self: &Arc<Self>, fut: Fut) -> Fut::Output

Run the

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§