#write #read #read-write #ext #extension #primitive #deal

io_ext

Read & Write extensions to deal with primitive types

2 unstable releases

0.2.0 Nov 13, 2021
0.1.0 Nov 5, 2021

#15 in #deal

Download history 54/week @ 2024-07-22 51/week @ 2024-07-29 96/week @ 2024-08-05 36/week @ 2024-08-12 155/week @ 2024-08-19 4/week @ 2024-08-26 18/week @ 2024-09-02 24/week @ 2024-09-09 17/week @ 2024-09-16 60/week @ 2024-09-23 103/week @ 2024-09-30 29/week @ 2024-10-07 48/week @ 2024-10-14 38/week @ 2024-10-21 29/week @ 2024-10-28 23/week @ 2024-11-04

141 downloads per month

MIT license

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