pub trait RequestRunner: Sync + Send {
// Required methods
fn prepare_request(
&self,
method: Method,
path: Url,
) -> Result<RequestBuilder>;
fn make_url(&self, path: &str) -> Result<Url>;
// Provided methods
fn prepare_request_with_body<B>(
&self,
method: Method,
path: Url,
body: B,
) -> Result<RequestBuilder>
where B: Serialize + Debug { ... }
fn process_response<'life0, 'async_trait, T>(
&'life0 self,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<Response<T>>> + Send + 'async_trait>>
where T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait { ... }
fn run<'life0, 'async_trait, T>(
&'life0 self,
method: Method,
path: Url,
) -> Pin<Box<dyn Future<Output = Result<Response<T>>> + Send + 'async_trait>>
where T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait { ... }
fn run_with_body<'life0, 'async_trait, T, B>(
&'life0 self,
method: Method,
path: Url,
body: B,
) -> Pin<Box<dyn Future<Output = Result<Response<T>>> + Send + 'async_trait>>
where T: DeserializeOwned + Send + 'async_trait,
B: Serialize + Debug + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn prepare_request(&self, method: Method, path: Url) -> Result<RequestBuilder>
fn make_url(&self, path: &str) -> Result<Url>
Provided Methods§
fn prepare_request_with_body<B>( &self, method: Method, path: Url, body: B, ) -> Result<RequestBuilder>
fn process_response<'life0, 'async_trait, T>(
&'life0 self,
response: Response,
) -> Pin<Box<dyn Future<Output = Result<Response<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait, T>(
&'life0 self,
method: Method,
path: Url,
) -> Pin<Box<dyn Future<Output = Result<Response<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn run_with_body<'life0, 'async_trait, T, B>(
&'life0 self,
method: Method,
path: Url,
body: B,
) -> Pin<Box<dyn Future<Output = Result<Response<T>>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
B: Serialize + Debug + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.