Trait ruma_client::http_client::HttpClient[][src]

pub trait HttpClient: Sync {
    type RequestBody: Default + BufMut + Send;
    type ResponseBody: AsRef<[u8]>;
    type Error: Send + Unpin;
    #[must_use]
    fn send_http_request<'life0, 'async_trait>(
        &'life0 self,
        req: Request<Self::RequestBody>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ResponseBody>, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

An HTTP client that can be used to send requests to a Matrix homeserver.

Associated Types

type RequestBody: Default + BufMut + Send[src]

Expand description

The type to use for try_into_http_request.

type ResponseBody: AsRef<[u8]>[src]

Expand description

The type to use for try_from_http_response.

type Error: Send + Unpin[src]

Expand description

The error type for the send_request function.

Required methods

#[must_use]
fn send_http_request<'life0, 'async_trait>(
    &'life0 self,
    req: Request<Self::RequestBody>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ResponseBody>, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Expand description

Send an http::Request to get back an http::Response.

Implementors