Skip to main content

ResolvedOptions

Struct ResolvedOptions 

Source
#[non_exhaustive]
pub struct ResolvedOptions {
Show 31 fields pub destination: PathBuf, pub output: Option<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 task_rate_limit: Option<u64>, pub file_jobs: usize, pub content_cache: bool, pub content_cache_dir: PathBuf, pub disk_space_check: bool, pub mirrors: Vec<Url>, pub segment_size: u64, pub resume: bool, pub verify: VerifyMode, pub checksum: Option<Checksum>, pub extract: bool, pub extract_dir: Option<PathBuf>, pub delete_archive: bool, pub cache: bool, pub include: Vec<String>, pub exclude: Vec<String>, pub request: RequestOptions, pub overwrite: bool, pub rename_on_conflict: bool, pub retries: u32, pub timeout: Duration, pub connect_timeout: Duration, pub user_agent: String,
}
Expand description

Options after task overrides and config defaults have been resolved.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§destination: PathBuf

Root directory for the task’s output files.

§output: Option<PathBuf>

Explicit output path, if one was requested.

§connections: usize

Effective connection count for this task.

§per_host: usize

Effective HTTP idle-connection limit per host.

§per_host_active: usize

Maximum active HTTP file-transfer requests per host carried from configuration.

§global: usize

Global active HTTP file-transfer request budget carried from configuration.

§rate_limit: Option<u64>

Global bandwidth limit in bytes per second, if configured.

§per_host_rate_limit: Option<u64>

Per-host bandwidth limit in bytes per second, if configured.

§task_rate_limit: Option<u64>

Additional per-task bandwidth limit in bytes per second, if configured.

§file_jobs: usize

Number of files downloaded concurrently within this task.

§content_cache: bool

Whether verified files are reused through the content-addressed cache.

§content_cache_dir: PathBuf

Root of the content-addressed cache.

§disk_space_check: bool

Whether to preflight the destination filesystem’s free space.

§mirrors: Vec<Url>

Alternate HTTP(S) URLs for the same file.

§segment_size: u64

Byte size of each ranged HTTP segment.

§resume: bool

Whether resume is enabled for this task.

§verify: VerifyMode

Effective checksum verification policy.

§checksum: Option<Checksum>

Expected checksum supplied by the task, if any.

§extract: bool

Whether archives should be extracted after download.

§extract_dir: Option<PathBuf>

Directory to extract archives into; None means the destination.

§delete_archive: bool

Whether to delete the archive after extraction.

§cache: bool

Whether to populate the provider cache for Hub tasks.

§include: Vec<String>

Include glob filters passed from the task.

§exclude: Vec<String>

Exclude glob filters passed from the task.

§request: RequestOptions

Merged request options: config headers plus task overrides.

§overwrite: bool

Whether existing destination files are replaced.

§rename_on_conflict: bool

Whether conflicting destinations are renamed.

§retries: u32

Effective retry count for failed transfers.

§timeout: Duration

Effective total request timeout.

§connect_timeout: Duration

Effective connection timeout.

§user_agent: String

Effective User-Agent header.

Trait Implementations§

Source§

impl Clone for ResolvedOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResolvedOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

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

fn in_current_span(self) -> Instrumented<Self> ⓘ

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more