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§
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>>
Provided Methods§
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>>
Object Safety§
This trait is not object safe.