Expand description
I/O wrappers for tracking data transfer.
This module provides ProgressReader and ProgressWriter, which wrap any implementation
of std::io::Read or std::io::Write.
§mechanics
These wrappers act as “pass-through” middleware. Every byte successfully read or written
automatically increments the associated Progress counter. This is particularly
useful for:
- File downloads/uploads.
- Hashing large files.
- Compressing/Decompressing data streams.
The overhead is minimal: a single atomic addition per read or write call.
Structs§
- Progress
Reader - A wrapper around
Readthat increments aProgresstracker based on bytes read. - Progress
Writer - A wrapper around
Writethat increments aProgresstracker based on bytes written.