Skip to main content

Module progress

Module progress 

Source
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.
MeterSnapshot
A point-in-time copy of a Meter’s counters.

Enums§

Phase
The coarse phase a Meter is currently recording.