Report network IO statistics.
You are writing a PaaS, and you need a way to bill customers based on network and filesystem usage.
Create a wrapper for network connections and files that can report IO statistics. The wrapper must report:
Network and file operations are implemented in terms of the io::Read
and io::Write
traits. It will therefore be necessary to implement those traits for your types.
Sign up to Exercism to learn and master Rust with 98 exercises, and real human mentoring, all for free.