pub struct DirectSource { /* private fields */ }Expand description
Plain HTTPS download source with Range header support for resume.
Implementations§
Trait Implementations§
Source§impl DownloadSource for DirectSource
impl DownloadSource for DirectSource
Source§fn can_handle(&self, directive: &DownloadDirective) -> bool
fn can_handle(&self, directive: &DownloadDirective) -> bool
Check if this source can handle the given directive.
Source§async fn resolve(&self, directive: &DownloadDirective) -> Result<DownloadHandle>
async fn resolve(&self, directive: &DownloadDirective) -> Result<DownloadHandle>
Resolve a directive into a download handle with a concrete URL.
Source§async fn download_with_progress(
&self,
handle: DownloadHandle,
dest: &Path,
progress: ProgressCallback,
) -> Result<VerifiedFile>
async fn download_with_progress( &self, handle: DownloadHandle, dest: &Path, progress: ProgressCallback, ) -> Result<VerifiedFile>
Download the file to
dest with progress reporting and verify its hash.Source§fn download(
&self,
handle: DownloadHandle,
dest: &Path,
) -> impl Future<Output = Result<VerifiedFile>> + Send
fn download( &self, handle: DownloadHandle, dest: &Path, ) -> impl Future<Output = Result<VerifiedFile>> + Send
Download the file to
dest and verify its hash (no-op progress).Auto Trait Implementations§
impl Freeze for DirectSource
impl !RefUnwindSafe for DirectSource
impl Send for DirectSource
impl Sync for DirectSource
impl Unpin for DirectSource
impl UnsafeUnpin for DirectSource
impl !UnwindSafe for DirectSource
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