Skip to main content

Module progress

Module progress 

Source
Expand description

Multi-task progress bars with configurable column layouts and iterable tracking. Progress bars and task tracking. Equivalent to Rich’s progress.py and progress_bar.py.

§Overview

Progress manages multiple concurrent tasks, each with its own description, total, and completed count. The display is built from configurable column types (see crate::progress_columns).

§Quick Example

use rusty_rich::Progress;

let mut progress = Progress::new();
let task = progress.add_task("Downloading...", Some(100.0));
progress.update(task, 50.0);
println!("{}", progress.render(80));

§Tracking Iterables

use rusty_rich::{Progress, TrackIterator};

let mut progress = Progress::new();
let items: Vec<i32> = (0..100).collect();
let tracker = progress.track(items, "Processing", None);
for item in tracker {
    // item is yielded, progress auto-advances
}

§File Progress

ProgressFile wraps a std::io::Read and tracks read progress via a Progress task. Use Progress::wrap_file to create one.

Structs§

Progress
A multi-task progress display.
ProgressBar
A single progress bar.
ProgressFile
A file wrapper that tracks read progress for use with a Progress instance.
RenderableColumn
A column that renders a custom renderable per task.
Task
A tracked task within a Progress display.
TrackIterator
An iterator wrapper that updates progress as items are consumed. Equivalent to Python Rich’s track().

Functions§

track
Create a TrackIterator from a sequence (standalone, no Progress).
wrap_file
Wrap a file with progress tracking (standalone, no Progress).