pub struct ProgressBarWrapper(/* private fields */);Expand description
A wrapper around a single ProgressBar for tracking progress during file downloads.
This struct implements the Progress trait and provides methods to handle the start,
progress updates, and finish events of a download operation.
Trait Implementations§
Source§impl Clone for ProgressBarWrapper
impl Clone for ProgressBarWrapper
Source§fn clone(&self) -> ProgressBarWrapper
fn clone(&self) -> ProgressBarWrapper
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 Default for ProgressBarWrapper
impl Default for ProgressBarWrapper
Source§fn default() -> ProgressBarWrapper
fn default() -> ProgressBarWrapper
Returns the “default value” for a type. Read more
Source§impl Progress for ProgressBarWrapper
impl Progress for ProgressBarWrapper
Source§fn on_start(&mut self, unit: &ProgressUnit) -> Result<(), OpsError>
fn on_start(&mut self, unit: &ProgressUnit) -> Result<(), OpsError>
Called when a download starts.
Initializes the progress bar with the total size of the file being downloaded.
Source§fn on_progress(&mut self, unit: &ProgressUnit) -> Result<(), OpsError>
fn on_progress(&mut self, unit: &ProgressUnit) -> Result<(), OpsError>
Called periodically to update the progress of a download.
Updates the position of the progress bar based on the current bytes downloaded.
Auto Trait Implementations§
impl Freeze for ProgressBarWrapper
impl RefUnwindSafe for ProgressBarWrapper
impl Send for ProgressBarWrapper
impl Sync for ProgressBarWrapper
impl Unpin for ProgressBarWrapper
impl UnsafeUnpin for ProgressBarWrapper
impl UnwindSafe for ProgressBarWrapper
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