Function tarrasque::le_u16 [] [src]

pub fn le_u16(bytes: &[u8]) -> u16

Returns the first two bytes in the supplied slice as a little-endian u16.

Example

let bytes = &[1, 2, 3, 4, 5, 6, 7, 8];
assert_eq!(le_u16(bytes), 0x0201);