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§

Create a new Download with a single download url

Create a new Download based on a list of mirror urls.

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)

Register handling of progress information

Defaults to not printing any progress information.

Register a callback to verify a download

Default is to assume the file was downloaded correctly.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more