pub fn uint16(bits: &Bits) -> u16Expand description
Converts up the first 16 bits of a bit string to a 16 bit unsigned integer.
ยงExample
let bits = Bits::new([0x10, 0xFE]);
let ushort = bits_as::uint16(&bits);
assert_eq!(ushort, 0xFE10);
let bits = Bits::from([0x10, 0x5E]);
let ushort = bits_as::uint16(&bits);
assert_eq!(ushort, 0x5E10);