pub trait HttpExtractExt {
// Required method
fn fetch<'life0, 'life1, 'async_trait, T>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
where T: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn download_chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
start: u64,
end: u64,
output_file: &'life2 mut File,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn download_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Extension of HTTP data-fetching methods for clients.
Required Methods§
fn fetch<'life0, 'life1, 'async_trait, T>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn download_chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
start: u64,
end: u64,
output_file: &'life2 mut File,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn download_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".