pub struct DownloadConfig {
pub user_agent: Option<String>,
pub timeout_seconds: u64,
pub connect_timeout_seconds: u64,
pub concurrent_connections: usize,
pub min_chunk_size: u64,
pub max_retries: usize,
pub retry_delay_ms: u64,
pub enable_chunked_download: bool,
}Expand description
下载配置
Fields§
§user_agent: Option<String>用户代理
timeout_seconds: u64请求超时时间(秒)
connect_timeout_seconds: u64连接超时时间(秒)
concurrent_connections: usize并发下载的线程数
min_chunk_size: u64每个分片的最小大小(字节)
max_retries: usize重试次数
retry_delay_ms: u64重试间隔(毫秒)
enable_chunked_download: bool是否启用分片下载
Trait 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 · 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 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