Trait AnyAsyncClient

Source
pub trait AnyAsyncClient:
    Any
    + Send
    + Sync
    + 'static {
    // Required methods
    fn describe(&self, f: &mut Formatter<'_>) -> Result;
    fn clone_boxed(&self) -> Box<dyn AnyAsyncClient>;
    fn request(
        &self,
        req: Request,
    ) -> BoxFuture<'_, Result<Box<dyn AnyAsyncResponse>>>;
}
Available on crate feature async only.
Expand description

Trait for type-erased async HTTP clients.

Automatically implemented for types implementing AsyncClient.

Required Methods§

Source

fn describe(&self, f: &mut Formatter<'_>) -> Result

Provides a textual description of this client.

Source

fn clone_boxed(&self) -> Box<dyn AnyAsyncClient>

Creates a cloned boxed version of this client.

Source

fn request( &self, req: Request, ) -> BoxFuture<'_, Result<Box<dyn AnyAsyncResponse>>>

Sends an HTTP request and returns the response.

Implementors§

Source§

impl<A> AnyAsyncClient for A
where A: AsyncClient,