Expand description
A pure, lock-free progress Meter for the filesystem walk and (later) the
transfer path.
Per the library-purity principle this module does no terminal I/O and
reads no $HOME/config/environment for behavior. The Meter is a bag
of std::sync::atomic counters updated with Ordering::Relaxed: the
recording side (walk_with_meter) bumps the
counters as it hashes files, and a (separately-laned) CLI renderer takes a
cheap MeterSnapshot to draw a progress bar. All methods take &self, so
the meter is shared across threads behind an Arc without
a lock.
The meter is intentionally advisory: recording into it never changes the walk’s output. A walk with a meter and the same walk without one produce byte-identical manifests.
Structs§
- Meter
- A lock-free progress meter shared across threads behind an
Arc. - Meter
Snapshot - A point-in-time copy of a
Meter’s counters.