pub struct Download<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Download<'a>
impl<'a> Download<'a>
pub fn new_with_data_verifier( client: Client, url: Url, data_verifier: &'a mut dyn DataVerifier, ) -> Self
pub fn from_response_with_data_verifier( response: Response, data_verifier: &'a mut dyn DataVerifier, ) -> Self
pub fn with_data_verifier( self, data_verifier: &mut dyn DataVerifier, ) -> Download<'_>
Source§impl Download<'_>
impl Download<'_>
Sourcepub async fn and_visit_tar(
self,
fmt: TarBasedFmt,
visitor: &mut dyn TarEntriesVisitor,
) -> Result<(), DownloadError>
pub async fn and_visit_tar( self, fmt: TarBasedFmt, visitor: &mut dyn TarEntriesVisitor, ) -> Result<(), DownloadError>
Download a file from the provided URL and process it in memory.
This does not support verifying a checksum due to the partial extraction and will ignore one if specified.
NOTE that this API does not support gnu extension sparse file unlike
Download::and_extract
.
Sourcepub async fn and_extract(
self,
fmt: PkgFmt,
path: impl AsRef<Path>,
) -> Result<ExtractedFiles, DownloadError>
pub async fn and_extract( self, fmt: PkgFmt, path: impl AsRef<Path>, ) -> Result<ExtractedFiles, DownloadError>
Download a file from the provided URL and extract it to the provided path.
NOTE that this will only extract directory and regular files.
pub async fn into_bytes(self) -> Result<Bytes, DownloadError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Download<'a>
impl<'a> !RefUnwindSafe for Download<'a>
impl<'a> Send for Download<'a>
impl<'a> Sync for Download<'a>
impl<'a> Unpin for Download<'a>
impl<'a> !UnwindSafe for Download<'a>
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