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§
Sourcetype AsyncClient: AsyncClient
type AsyncClient: AsyncClient
The type of client this backend creates.
Required Methods§
Sourcefn create_async_client(
&self,
options: ClientOptions,
) -> impl Future<Output = Result<Self::AsyncClient>> + Send
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".