pub trait Fetch: Send + Sync {
// Required method
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<Fetched>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
An HTTP GET.
Required Methods§
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<Fetched>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<Fetched>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
GET url with headers. An error is a transport failure; any HTTP
status is a Fetched.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".