pub trait AsyncHttpClient {
type Error;
// Required methods
fn get<Q, R>(
&self,
path: &str,
query: &Q,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where Q: Serialize,
R: DeserializeOwned;
fn post<B, R>(
&self,
path: &str,
body: &B,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where B: Serialize,
R: DeserializeOwned;
fn put<B, R>(
&self,
path: &str,
body: &B,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where B: Serialize,
R: DeserializeOwned;
fn delete<B, R>(
&self,
path: &str,
body: &B,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where B: Serialize,
R: DeserializeOwned;
}Required Associated Types§
Required Methods§
fn get<Q, R>(
&self,
path: &str,
query: &Q,
) -> impl Future<Output = Result<R, Self::Error>> + Sendwhere
Q: Serialize,
R: DeserializeOwned,
fn post<B, R>(
&self,
path: &str,
body: &B,
) -> impl Future<Output = Result<R, Self::Error>> + Sendwhere
B: Serialize,
R: DeserializeOwned,
fn put<B, R>(
&self,
path: &str,
body: &B,
) -> impl Future<Output = Result<R, Self::Error>> + Sendwhere
B: Serialize,
R: DeserializeOwned,
fn delete<B, R>(
&self,
path: &str,
body: &B,
) -> impl Future<Output = Result<R, Self::Error>> + Sendwhere
B: Serialize,
R: DeserializeOwned,
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.