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§
Sourcefn describe(&self, f: &mut Formatter<'_>) -> Result
fn describe(&self, f: &mut Formatter<'_>) -> Result
Provides a textual description of this client.
Sourcefn clone_boxed(&self) -> Box<dyn AnyAsyncClient>
fn clone_boxed(&self) -> Box<dyn AnyAsyncClient>
Creates a cloned boxed version of this client.