pub struct HttpBackend { /* private fields */ }Implementations§
Source§impl HttpBackend
impl HttpBackend
pub fn new(config: &Config) -> Result<Self>
Sourcepub async fn download_file(
&self,
request: &DownloadRequest,
file: &ResourceFile,
task_resume: &mut TaskResume,
) -> Result<FileOutcome>
pub async fn download_file( &self, request: &DownloadRequest, file: &ResourceFile, task_resume: &mut TaskResume, ) -> Result<FileOutcome>
Download one resource file, sharing the caller’s task resume. This is public so protocol-specific backends (Hub) can reuse the segmented, resumable HTTP transfer without duplicating it.
Trait Implementations§
Source§impl Clone for HttpBackend
impl Clone for HttpBackend
Source§impl DownloadBackend for HttpBackend
impl DownloadBackend for HttpBackend
fn name(&self) -> &'static str
fn capabilities(&self) -> BackendCapabilities
fn supports(&self, resource: &Resource) -> bool
fn download<'life0, 'async_trait>(
&'life0 self,
request: DownloadRequest,
) -> Pin<Box<dyn Future<Output = Result<DownloadOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for HttpBackend
impl !UnwindSafe for HttpBackend
impl Forget for HttpBackend
impl Freeze for HttpBackend
impl Move for HttpBackend
impl Send for HttpBackend
impl Sync for HttpBackend
impl Unpin for HttpBackend
impl UnsafeUnpin for HttpBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more