pub struct DownloadStats {
pub attempted: u64,
pub completed: u64,
pub failed: u64,
pub canceled: u64,
pub queued: u64,
pub total_bytes: u64,
pub total_retries: u64,
pub total_duration: Duration,
pub avg_duration: Option<Duration>,
pub avg_speed_bytes_per_sec: Option<f64>,
pub peak_speed_bytes_per_sec: f64,
pub success_rate: Option<f64>,
}Expand description
Aggregate counters and derived metrics for all download operations.
Fields§
§attempted: u64Total number of downloads that were enqueued.
completed: u64Completed downloads.
failed: u64Downloads that ended with an error.
canceled: u64Downloads that were canceled.
queued: u64Downloads currently waiting in the queue.
total_bytes: u64Sum of bytes transferred across all completed downloads.
total_retries: u64Total number of retry attempts across all downloads.
total_duration: DurationCumulative wall-clock time spent downloading (completed downloads only).
avg_duration: Option<Duration>Average duration per completed download, or None if no downloads finished yet.
avg_speed_bytes_per_sec: Option<f64>Average throughput in bytes per second, or None if no data transferred.
peak_speed_bytes_per_sec: f64Highest per-download peak speed observed, in bytes per second.
success_rate: Option<f64>Ratio of completed to terminal downloads, or None if no terminal downloads.
Trait Implementations§
Source§impl Clone for DownloadStats
impl Clone for DownloadStats
Source§fn clone(&self) -> DownloadStats
fn clone(&self) -> DownloadStats
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 DownloadStats
impl Debug for DownloadStats
Source§impl Display for DownloadStats
impl Display for DownloadStats
Auto Trait Implementations§
impl Freeze for DownloadStats
impl RefUnwindSafe for DownloadStats
impl Send for DownloadStats
impl Sync for DownloadStats
impl Unpin for DownloadStats
impl UnsafeUnpin for DownloadStats
impl UnwindSafe for DownloadStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.