Trait meilisearch_sdk::request::HttpClient

source ·
pub trait HttpClient: Clone + Send + Sync {
    // Required method
    fn stream_request<'life0, 'life1, 'life2, 'async_trait, Query, Body, Output>(
        &'life0 self,
        url: &'life1 str,
        method: Method<Query, Body>,
        content_type: &'life2 str,
        expected_status_code: u16,
    ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
       where Query: 'async_trait + Serialize + Send + Sync,
             Body: 'async_trait + AsyncRead + Send + Sync + 'static,
             Output: 'async_trait + DeserializeOwned + 'static,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn request<'life0, 'life1, 'async_trait, Query, Body, Output>(
        &'life0 self,
        url: &'life1 str,
        method: Method<Query, Body>,
        expected_status_code: u16,
    ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
       where Query: Serialize + Send + Sync + 'async_trait,
             Body: Serialize + Send + Sync + 'async_trait,
             Output: DeserializeOwned + 'static + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

source

fn stream_request<'life0, 'life1, 'life2, 'async_trait, Query, Body, Output>( &'life0 self, url: &'life1 str, method: Method<Query, Body>, content_type: &'life2 str, expected_status_code: u16, ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
where Query: 'async_trait + Serialize + Send + Sync, Body: 'async_trait + AsyncRead + Send + Sync + 'static, Output: 'async_trait + DeserializeOwned + 'static, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Provided Methods§

source

fn request<'life0, 'life1, 'async_trait, Query, Body, Output>( &'life0 self, url: &'life1 str, method: Method<Query, Body>, expected_status_code: u16, ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
where Query: Serialize + Send + Sync + 'async_trait, Body: Serialize + Send + Sync + 'async_trait, Output: DeserializeOwned + 'static + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl HttpClient for Infallible

source§

fn request<'life0, 'life1, 'async_trait, Query, Body, Output>( &'life0 self, _url: &'life1 str, _method: Method<Query, Body>, _expected_status_code: u16, ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
where Query: Serialize + Send + Sync + 'async_trait, Body: Serialize + Send + Sync + 'async_trait, Output: DeserializeOwned + 'static + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn stream_request<'life0, 'life1, 'life2, 'async_trait, Query, Body, Output>( &'life0 self, _url: &'life1 str, _method: Method<Query, Body>, _content_type: &'life2 str, _expected_status_code: u16, ) -> Pin<Box<dyn Future<Output = Result<Output, Error>> + Send + 'async_trait>>
where Query: 'async_trait + Serialize + Send + Sync, Body: 'async_trait + AsyncRead + Send + Sync + 'static, Output: 'async_trait + DeserializeOwned + 'static, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§