[−][src]Crate endicon
Implements endianness encodings using the codicon
traits.
See the codicon
crate for details.
Examples
use endicon::Endianness; use codicon::Encoder; let mut bytes = [0u8; 2]; let little = [1u8, 0u8]; let big = [0u8, 1u8]; 1u16.encode(&mut bytes.as_mut(), Endianness::Little).unwrap(); assert_eq!(bytes, little); 1u16.encode(&mut bytes.as_mut(), Endianness::Big).unwrap(); assert_eq!(bytes, big);
Enums
Endianness | Endianness to use during encoding/decoding |