pub trait HttpFetch:
Send
+ Sync
+ Unpin
+ 'static {
// Required method
fn fetch(
&self,
req: Request<Buffer>,
) -> impl Future<Output = Result<Response<HttpBody>>> + MaybeSend;
}
Expand description
HttpFetch is the trait to fetch a request in async way. User should implement this trait to provide their own http client.
Required Methods§
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.