pub struct PullProgressAggregator { /* private fields */ }Expand description
Folds a stream of PullProgress into a single overall percent, so a host
shows one progress bar for a multi-layer download. A streaming pull reports
completed/total per digest and resends a digest’s line as it grows;
this keeps the latest figures per digest, so the overall percent is
100 * Σcompleted / Σtotal across the digests seen so far.
Implementations§
Source§impl PullProgressAggregator
impl PullProgressAggregator
Sourcepub fn update(&mut self, progress: &PullProgress) -> Option<f64>
pub fn update(&mut self, progress: &PullProgress) -> Option<f64>
Fold one progress update in (only digest lines carrying a total
count) and return the overall percent so far — None until any byte
total is known (e.g. during the manifest phase).
Trait Implementations§
Source§impl Debug for PullProgressAggregator
impl Debug for PullProgressAggregator
Source§impl Default for PullProgressAggregator
impl Default for PullProgressAggregator
Source§fn default() -> PullProgressAggregator
fn default() -> PullProgressAggregator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PullProgressAggregator
impl RefUnwindSafe for PullProgressAggregator
impl Send for PullProgressAggregator
impl Sync for PullProgressAggregator
impl Unpin for PullProgressAggregator
impl UnsafeUnpin for PullProgressAggregator
impl UnwindSafe for PullProgressAggregator
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