pub struct DownloadConfig {
pub max_connections: usize,
pub min_chunk_size: u64,
pub piece_size: u64,
pub write_buffer: usize,
pub max_retries: u32,
pub piece_timeout: Duration,
pub connect_timeout: Duration,
pub quiet: bool,
}Expand description
Tunables for the download engine.
Defaults are chosen to be fast and safe on a typical broadband link while
keeping peak memory bounded (roughly 2 * max_connections * write_buffer).
Fields§
§max_connections: usize§min_chunk_size: u64§piece_size: u64§write_buffer: usize§max_retries: u32§piece_timeout: Duration§connect_timeout: Duration§quiet: boolTrait Implementations§
Source§impl Clone for DownloadConfig
impl Clone for DownloadConfig
Source§fn clone(&self) -> DownloadConfig
fn clone(&self) -> DownloadConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DownloadConfig
impl Debug for DownloadConfig
Auto Trait Implementations§
impl Freeze for DownloadConfig
impl RefUnwindSafe for DownloadConfig
impl Send for DownloadConfig
impl Sync for DownloadConfig
impl Unpin for DownloadConfig
impl UnsafeUnpin for DownloadConfig
impl UnwindSafe for DownloadConfig
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