rend is a library that provides endian-aware primitives for Rust.
rend in action
use *;
let little_int = new;
// Internal representation is little-endian
assert_eq!;
// Can also be made with `.into()`
let little_int: i32_le = 0x12345678.into;
// Still formats correctly
assert_eq!;
assert_eq!;
let big_int = new;
// Internal representation is big-endian
assert_eq!;
// Can also be made with `.into()`
let big_int: i32_be = 0x12345678.into;
// Still formats correctly
assert_eq!;
assert_eq!;