pub fn uint8(bits: &Bits) -> u8Expand description
Converts up to the first 8 bits of a bit string to a 8 bit unsigned integer.
ยงExample
let bits = Bits::new([0xFE]);
let byte = bits_as::uint8(&bits);
assert_eq!(byte, 0xFE);
let bits = Bits::from([0x5E]);
let byte = bits_as::uint8(&bits);
assert_eq!(byte, 0x5E);