pub struct ResumeInfo {
pub url: Option<Url>,
pub size: u64,
pub progress: Vec<ProgressEntry>,
pub elapsed: Duration,
}Expand description
已保存、可续传下载的只读快照,由 DownloadState::snapshot 产出。
与引擎内部的 DownloadState(持有 Mutex 与脏标记、可持久化)不同,这是一个纯数据视图,
供 UI 等只读消费者在不持有内部 MutexGuard 的情况下读取进度元数据。
Fields§
§url: Option<Url>持久化的初始 URL;旧 .fd 可能缺失,故为 Option。
size: u64保存时记录的总大小;缺失时回退为 0。
progress: Vec<ProgressEntry>已写入 .part 的字节区间(续传进度的唯一真相)。
elapsed: Duration跨所有续传累计的活跃下载时长。
Trait Implementations§
Source§impl Clone for ResumeInfo
impl Clone for ResumeInfo
Source§fn clone(&self) -> ResumeInfo
fn clone(&self) -> ResumeInfo
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 moreAuto Trait Implementations§
impl Freeze for ResumeInfo
impl RefUnwindSafe for ResumeInfo
impl Send for ResumeInfo
impl Sync for ResumeInfo
impl Unpin for ResumeInfo
impl UnsafeUnpin for ResumeInfo
impl UnwindSafe for ResumeInfo
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