#byte #byteorder #io

podio

Additional trait for Read and Write to read and write Plain Old Data

13 releases

0.1.6 Jan 6, 2018
0.1.5 Jan 12, 2016
0.1.4 Jul 2, 2015
0.1.3 Apr 24, 2015
0.0.4 Mar 22, 2015

#3 in Value formatting

Download history 4578/week @ 2018-05-27 5105/week @ 2018-06-03 6843/week @ 2018-06-10 4804/week @ 2018-06-17 5268/week @ 2018-06-24 5265/week @ 2018-07-01 4036/week @ 2018-07-08 4493/week @ 2018-07-15 4663/week @ 2018-07-22 3605/week @ 2018-07-29 3553/week @ 2018-08-05 2953/week @ 2018-08-12 3717/week @ 2018-08-19

15,369 downloads per month
Used in 87 crates (3 directly)

MIT/Apache

13KB
209 lines

podio

Build Status Build status Crates.io version

Documentation

Implementation for reading and writing POD (plain old data) values in Rust. The name stands for POD I/O.

Keywords: byte, be, le, big-endian, little-endian

Usage

Include the following code:

[dependencies]
podio = "0.1"

Example

extern crate podio;

use podio::{ReadPodExt, BigEndian};

fn main() {
    let slice: &[u8] = &[0x10, 0x20, 0x30, 0x40];
    let mut reader = std::io::Cursor::new(slice);

    let value = reader.read_u32::<BigEndian>().unwrap();

    assert_eq!(value, 0x10203040);
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps