Skip to main content

show_progress

Function show_progress 

Source
pub fn show_progress(message: &str, total_steps: u32) -> Progress
Expand description

Starts an animated progress indicator on a background Tokio task.

  • total_steps == 0 → spinner mode (indeterminate).
  • total_steps > 0 → progress-bar mode, split across that many steps.

The caller performs its work while the animation runs and then calls Progress::finish to stop animating and print a ✓ completion line. finish (or an explicit Progress::abort) clears the progress line and restores the cursor, so nothing is left behind on screen.