4 releases
Uses old Rust 2015
0.1.4 | Jul 19, 2017 |
---|---|
0.1.2 | Jul 13, 2017 |
0.1.1 | Jul 13, 2017 |
0.1.0 | Jul 13, 2017 |
#20 in #repr
5KB
161 lines
IOEndian
A tiny library to declaratively define endianness in a portable way, for IO.
Allows an easy .native()
method to convert to native endianness.
Examples
struct SomeStruct {
first: Big<u16>,
second: Big<i32>,
}
let foo = SomeStruct {
first: Big([2, 1]),
second: Big([2, 1, 1, 1]),
};
assert_eq!(foo.first.native() + foo.second.native(), 513 + 33_620_225)