Trait AnyBlockingClient

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

Trait for type-erased blocking HTTP clients.

Automatically implemented for types implementing BlockingClient.

Required Methods§

Source

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

Provides a textual description of this client.

Source

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

Creates a cloned boxed version of this client.

Source

fn request(&self, req: Request) -> Result<Box<dyn AnyBlockingResponse>>

Sends an HTTP request and returns the response.

Implementors§