Skip to main content

Client

Trait Client 

Source
pub trait Client: Send + 'static {
    // Required method
    fn fetch(
        self,
        request: Request,
    ) -> impl Future<Output = Result<Response>> + Send;
}
Expand description

Fetches the Response for a single Request.

Required Methods§

Source

fn fetch( self, request: Request, ) -> impl Future<Output = Result<Response>> + Send

Fetches the response for the request, consuming the client.

§Errors

Returns an error if the request cannot be sent or the transfer fails.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§