Expand description
Iterator adapters for automatic progress tracking.
This module provides the ProgressIteratorExt trait, which adds helper methods
to any Rust Iterator. This allows you to attach a progress bar to a loop with
a single method call.
§Heuristics
The adapters automatically check Iterator::size_hint:
- If the iterator provides an exact upper bound, a Bar is created with that total.
- If the bounds are unknown (or
(0, None)), a Spinner is created.
§Example
ⓘ
use atomic_progress::ProgressIteratorExt;
// Automatically becomes a Bar because vec.len() is known
for item in vec![1, 2, 3].into_iter().progress() {
// ...
}Structs§
- Progress
Iter - An iterator adapter that wraps an underlying iterator and tracks progress.
Traits§
- Progress
Iterator Ext - Extension trait to easily attach progress tracking to any Iterator.