pub struct ProgressReporter {
pub trackers: Vec<ExtendedProgress>,
}Expand description
Progress reporter that handles multiple concurrent downloads.
Fields§
§trackers: Vec<ExtendedProgress>Active progress trackers
Implementations§
Source§impl ProgressReporter
impl ProgressReporter
Sourcepub fn add_tracker(&mut self, progress: Progress) -> usize
pub fn add_tracker(&mut self, progress: Progress) -> usize
Add a new progress tracker.
Sourcepub fn update_tracker(&mut self, index: usize, progress: Progress)
pub fn update_tracker(&mut self, index: usize, progress: Progress)
Update a progress tracker by index.
Sourcepub fn get_tracker(&self, index: usize) -> Option<&ExtendedProgress>
pub fn get_tracker(&self, index: usize) -> Option<&ExtendedProgress>
Get a progress tracker by index.
Sourcepub fn total_progress(&self) -> Progress
pub fn total_progress(&self) -> Progress
Get the total progress across all trackers.
Sourcepub fn total_rate(&self) -> Option<f64>
pub fn total_rate(&self) -> Option<f64>
Get the total download rate across all trackers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProgressReporter
impl RefUnwindSafe for ProgressReporter
impl Send for ProgressReporter
impl Sync for ProgressReporter
impl Unpin for ProgressReporter
impl UnsafeUnpin for ProgressReporter
impl UnwindSafe for ProgressReporter
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