tree: 7e2dd2b22df986f4cb1d986f06376812bc696334 [path history] [tgz]
  1. benches/
  2. script/
  3. src/
  4. tests/
  5. .cargo-checksum.json
  6. appveyor.yml
  7. Cargo.toml
  8. LICENSE-APACHE
  9. LICENSE-MIT
  10. README.md
third_party/rust_crates/vendor/podio/README.md

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.