pub struct ProgressTracker { /* private fields */ }
Expand description
Progress tracker for file operations
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn new(total_size: u64, operation: &str) -> Self
pub fn new(total_size: u64, operation: &str) -> Self
Create a new progress tracker with total size
Sourcepub fn new_spinner(operation: &str) -> Self
pub fn new_spinner(operation: &str) -> Self
Create a spinner for operations without known size
Sourcepub fn set_position(&self, pos: u64)
pub fn set_position(&self, pos: u64)
Set current position
Sourcepub fn set_message(&self, msg: &str)
pub fn set_message(&self, msg: &str)
Set message for spinner
Sourcepub fn finish_and_clear(&self)
pub fn finish_and_clear(&self)
Mark operation as finished and clear
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProgressTracker
impl RefUnwindSafe for ProgressTracker
impl Send for ProgressTracker
impl Sync for ProgressTracker
impl Unpin for ProgressTracker
impl UnwindSafe for ProgressTracker
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more