Skip to main content

AsyncBackend

Trait AsyncBackend 

Source
pub trait AsyncBackend:
    Send
    + Sync
    + 'static {
    type AsyncClient: AsyncClient;

    // Required method
    fn create_async_client(
        &self,
        options: ClientOptions,
    ) -> impl Future<Output = Result<Self::AsyncClient>> + Send;
}
Available on crate feature async only.
Expand description

Trait for asynchronous HTTP backend implementations.

This trait represents a backend implementation that can create async HTTP clients.

Required Associated Types§

Source

type AsyncClient: AsyncClient

The type of client this backend creates.

Required Methods§

Source

fn create_async_client( &self, options: ClientOptions, ) -> impl Future<Output = Result<Self::AsyncClient>> + Send

Creates a new async client with the given options.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§