pub struct ProgressTracker { /* private fields */ }Expand description
Progress tracker for multi-step installation processes.
Tracks current step against total steps and produces formatted “Step N/M: …” output.
§Validation
- VAL-INFRA-012: Progress reporting with step counting
Implementations§
Source§impl ProgressTracker
impl ProgressTracker
Sourcepub fn new(total: u32) -> Self
pub fn new(total: u32) -> Self
Create a new progress tracker with the given total number of steps.
Sourcepub fn with_component(total: u32, component: &str) -> Self
pub fn with_component(total: u32, component: &str) -> Self
Create a tracker with a component name for context.
Sourcepub fn advance(&mut self, description: &str) -> u32
pub fn advance(&mut self, description: &str) -> u32
Advance to the next step and log the description.
Returns the current step number (1-based).
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all steps have been completed.
Sourcepub fn format_step(&self, description: &str) -> String
pub fn format_step(&self, description: &str) -> String
Format a progress message without printing.
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 UnsafeUnpin 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> 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 more