#read-write #io-read #read #write #extension #io-write #numbers

rw-exact-ext

Extension of std::io to read and write data types with exact amounts of bytes

4 releases

0.1.10 Aug 29, 2024
0.1.7 Oct 20, 2023

#1401 in Rust patterns

Download history 29/week @ 2024-07-23 13/week @ 2024-07-30 126/week @ 2024-08-27 8/week @ 2024-09-10 4/week @ 2024-09-17 6/week @ 2024-09-24 14/week @ 2024-10-01

423 downloads per month

MIT license

12KB
89 lines

rw-exact-ext

Extension of std::io to read and write data types with exact amounts of bytes.

Usage

This library provides two traits, rw_exact_ext::ReadExactExt and rw_exact_ext::WriteAllExt.

ReadExactExt

This trait provides functions to read byte arrays of a constant size and vectors of a runtime-defined size from a reader that implements std::io::Read.
If the feature num-traits is enabled, it also provides functions to read numbers from such a reader.

WriteAllExt

This trait provides writers that implement std::io::Write with an additional method to write booleans. If the feature num-traits is enabled, it also provides functions to write numbers to such a writer.

Dependencies

~145KB