pub trait HttpClient: Send + Sync {
// Required method
fn fetch<'a>(
&'a self,
url: &'a str,
timeout: Duration,
) -> BoxFuture<'a, Result<HttpResponse, WebFetchError>>;
}Expand description
Trait for HTTP clients that can fetch web content
Required Methods§
fn fetch<'a>( &'a self, url: &'a str, timeout: Duration, ) -> BoxFuture<'a, Result<HttpResponse, WebFetchError>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".