pub struct StepTracker { /* private fields */ }Expand description
Status indicator for multi-step operations.
Implementations§
Source§impl StepTracker
impl StepTracker
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Set whether output is enabled.
Sourcepub fn complete_step(&self, message: impl Into<String>)
pub fn complete_step(&self, message: impl Into<String>)
Complete the current step with a message.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all steps are complete.
Sourcepub fn total_steps(&self) -> usize
pub fn total_steps(&self) -> usize
Get the total number of steps.
Sourcepub fn current_step(&self) -> usize
pub fn current_step(&self) -> usize
Get the current step number (1-indexed).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StepTracker
impl RefUnwindSafe for StepTracker
impl Send for StepTracker
impl Sync for StepTracker
impl Unpin for StepTracker
impl UnsafeUnpin for StepTracker
impl UnwindSafe for StepTracker
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