pub struct ProgressTracker { /* private fields */ }Expand description
Enhanced progress tracker with multi-step support.
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn with_theme(message: &str, theme: Theme) -> Self
pub fn with_theme(message: &str, theme: Theme) -> Self
Create a new tracker with theme.
Sourcepub fn set_active(&mut self, index: usize)
pub fn set_active(&mut self, index: usize)
Set the current step as active.
Sourcepub fn set_detail(&mut self, detail: &str)
pub fn set_detail(&mut self, detail: &str)
Set detail text for current step.
Sourcepub fn complete_current(&mut self)
pub fn complete_current(&mut self)
Mark the current step as completed.
Sourcepub fn complete_step(&mut self, index: usize)
pub fn complete_step(&mut self, index: usize)
Mark a specific step as completed.
Sourcepub fn fail_current(&mut self)
pub fn fail_current(&mut self)
Mark the current step as failed.
Sourcepub fn finish_with_success(&self, message: &str)
pub fn finish_with_success(&self, message: &str)
Finish with a success message.
Sourcepub fn finish_with_error(&self, message: &str)
pub fn finish_with_error(&self, message: &str)
Finish with an error message.
Sourcepub fn timing_breakdown(&self) -> &[(String, u64)]
pub fn timing_breakdown(&self) -> &[(String, u64)]
Get the timing breakdown.
Sourcepub fn elapsed_ms(&self) -> u64
pub fn elapsed_ms(&self) -> u64
Get total elapsed time in milliseconds.
Sourcepub fn elapsed_formatted(&self) -> String
pub fn elapsed_formatted(&self) -> String
Get formatted elapsed time.
Sourcepub fn progress_bar(&self) -> &ProgressBar
pub fn progress_bar(&self) -> &ProgressBar
Get the progress bar for external control.
Sourcepub fn progress_bar_mut(&mut self) -> &mut ProgressBar
pub fn progress_bar_mut(&mut self) -> &mut ProgressBar
Get mutable progress bar for external control.
Trait Implementations§
Source§impl Clone for ProgressTracker
impl Clone for ProgressTracker
Source§fn clone(&self) -> ProgressTracker
fn clone(&self) -> ProgressTracker
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 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.