pub struct DownloadOptions<I: Iterator<Item = ProgressEntry>> {
pub download_chunks: I,
pub concurrent: usize,
pub retry_gap: Duration,
pub pull_timeout: Duration,
pub push_queue_cap: usize,
pub min_chunk_size: u64,
pub max_speculative: usize,
}Expand description
Options for a multi-threaded concurrent download.
Controls chunk splitting, speculation, pull timeouts, and write queue capacity.
Fields§
§download_chunks: IInitial byte ranges to download, each an independent unit of work.
concurrent: usizeNumber of concurrent workers.
retry_gap: DurationDelay before retrying a failed pull or push.
pull_timeout: DurationMaximum time to wait for bytes before aborting and re-pulling a range.
push_queue_cap: usizeCapacity of the bounded pull→push queue; backpressure when full.
min_chunk_size: u64Minimum size (bytes) of a range handed to a worker when stealing.
max_speculative: usizeMaximum number of workers allowed to speculatively share one range.
Trait Implementations§
Source§impl<I: Clone + Iterator<Item = ProgressEntry>> Clone for DownloadOptions<I>
impl<I: Clone + Iterator<Item = ProgressEntry>> Clone for DownloadOptions<I>
Auto Trait Implementations§
impl<I> Freeze for DownloadOptions<I>where
I: Freeze,
impl<I> RefUnwindSafe for DownloadOptions<I>where
I: RefUnwindSafe,
impl<I> Send for DownloadOptions<I>where
I: Send,
impl<I> Sync for DownloadOptions<I>where
I: Sync,
impl<I> Unpin for DownloadOptions<I>where
I: Unpin,
impl<I> UnsafeUnpin for DownloadOptions<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for DownloadOptions<I>where
I: UnwindSafe,
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