15 releases

Uses old Rust 2015

0.2.0 May 28, 2020
0.1.7 May 28, 2020
0.1.6 Jan 6, 2018
0.1.5 Jan 12, 2016
0.0.4 Mar 22, 2015

#798 in Rust patterns

Download history 2088/week @ 2024-06-15 2272/week @ 2024-06-22 1482/week @ 2024-06-29 1197/week @ 2024-07-06 2705/week @ 2024-07-13 2133/week @ 2024-07-20 1805/week @ 2024-07-27 1749/week @ 2024-08-03 2694/week @ 2024-08-10 1963/week @ 2024-08-17 1917/week @ 2024-08-24 2052/week @ 2024-08-31 1478/week @ 2024-09-07 1326/week @ 2024-09-14 1897/week @ 2024-09-21 1684/week @ 2024-09-28

6,664 downloads per month
Used in 89 crates (via terminal_thrift)

MIT/Apache

12KB
162 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.2"

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