2 unstable releases
0.2.0 | Nov 13, 2021 |
---|---|
0.1.0 | Nov 5, 2021 |
#11 in #deal
258 downloads per month
9KB
117 lines
io_ext
Extensions for Read
& Write
traits from standard library to make work with primitive types easier.
Usage
fn main() {
use io_ext::ReadExt;
let data = b"\x00\x02\x03\x00";
let mut slice = &data[..];
assert_eq!(slice.read_u16_be(), 2);
assert_eq!(slice.read_u16_le(), 3);
}
lib.rs
:
io_ext
Provies methods to deal with primitive types from std::io::Read
& std::io::Write
Dependencies
~4KB