pub struct ExtendedProgress {
pub base: Progress,
pub rate_bps: Option<f64>,
pub eta_seconds: Option<u64>,
pub history: VecDeque<ProgressSnapshot>,
pub start_time: Instant,
pub last_update: Instant,
pub performance_metrics: PerformanceMetrics,
}Expand description
Extended progress information with detailed metrics.
Fields§
§base: ProgressBase progress information
rate_bps: Option<f64>Download rate in bytes per second
eta_seconds: Option<u64>Estimated time remaining in seconds
history: VecDeque<ProgressSnapshot>Historical progress snapshots for rate calculation
start_time: InstantStart time of the download
last_update: InstantLast update time
performance_metrics: PerformanceMetricsPerformance metrics collection
Implementations§
Source§impl ExtendedProgress
impl ExtendedProgress
Sourcepub fn update(&mut self, progress: Progress)
pub fn update(&mut self, progress: Progress)
Update progress with new data and recalculate metrics.
Sourcepub fn speed_string(&self) -> String
pub fn speed_string(&self) -> String
Get the current download speed formatted as a human-readable string.
Sourcepub fn eta_string(&self) -> String
pub fn eta_string(&self) -> String
Get the ETA formatted as a human-readable string.
Sourcepub fn elapsed_seconds(&self) -> u64
pub fn elapsed_seconds(&self) -> u64
Get the elapsed time since download started.
Sourcepub fn elapsed_string(&self) -> String
pub fn elapsed_string(&self) -> String
Get the elapsed time formatted as a human-readable string.
Trait Implementations§
Source§impl Clone for ExtendedProgress
impl Clone for ExtendedProgress
Source§fn clone(&self) -> ExtendedProgress
fn clone(&self) -> ExtendedProgress
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 moreAuto Trait Implementations§
impl Freeze for ExtendedProgress
impl RefUnwindSafe for ExtendedProgress
impl Send for ExtendedProgress
impl Sync for ExtendedProgress
impl Unpin for ExtendedProgress
impl UnsafeUnpin for ExtendedProgress
impl UnwindSafe for ExtendedProgress
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