Struct downloader::download::Download
source · pub struct Download {
pub urls: Vec<String>,
pub progress: Option<Progress>,
pub file_name: PathBuf,
pub verify_callback: Verify,
}
Expand description
A Download
.
Fields§
§urls: Vec<String>
A list of URLs that this file can be retrieved from. downloader
will pick
the download URL from this list at random.
progress: Option<Progress>
A progress Reporter
to report the download process with.
file_name: PathBuf
The file name to be used for the downloaded file.
verify_callback: Verify
A callback used to verify the download with.
Implementations§
source§impl Download
impl Download
sourcepub fn new_mirrored(urls: &[&str]) -> Self
pub fn new_mirrored(urls: &[&str]) -> Self
Create a new Download
based on a list of mirror urls.
sourcepub fn file_name(self, path: &Path) -> Self
pub fn file_name(self, path: &Path) -> Self
Set the name of the downloaded file. This filename can be absolute or
relative to the download_folder
defined in the Downloader
.
Default is the file name on the server side (if available)