#[non_exhaustive]pub struct DownloadConfig {Show 17 fields
pub dir: PathBuf,
pub connections: usize,
pub per_host: usize,
pub per_host_active: usize,
pub global: usize,
pub rate_limit: Option<u64>,
pub per_host_rate_limit: Option<u64>,
pub file_jobs: usize,
pub content_cache: bool,
pub content_cache_dir: Option<PathBuf>,
pub disk_space_check: bool,
pub segment_size: u64,
pub resume: bool,
pub verify: VerifyMode,
pub extract: bool,
pub extract_dir: Option<PathBuf>,
pub delete_archive: bool,
}Expand description
Defaults for how files are downloaded, resumed, verified and extracted.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dir: PathBufDefault destination directory.
connections: usizeDefault number of parallel connections per task.
per_host: usizeMaximum number of idle connections kept per host in the HTTP pool.
per_host_active: usizeMaximum number of active HTTP file-transfer requests per host across all tasks.
global: usizeMaximum number of active HTTP file-transfer requests across all tasks.
rate_limit: Option<u64>Global bandwidth limit in bytes per second. None or 0 means
unlimited. Direct HTTP and Hub file transfers share this limit.
per_host_rate_limit: Option<u64>Additional bandwidth cap per destination host in bytes per second.
None or 0 means unlimited.
file_jobs: usizeNumber of files downloaded concurrently within one multi-file task.
content_cache: boolReuse verified downloads through the content-addressed cache.
content_cache_dir: Option<PathBuf>Override for the content-addressed cache root.
disk_space_check: boolRefuse a task before transfer when the destination filesystem has less free space than the known remaining size.
segment_size: u64Size in bytes of each ranged HTTP segment.
resume: boolResume interrupted downloads from checkpoints by default.
verify: VerifyModeDefault checksum verification policy.
extract: boolExtract archives after download by default.
extract_dir: Option<PathBuf>Default extraction directory; None extracts under the destination.
delete_archive: boolDelete archives after successful extraction by default.