uint32

Function uint32 

Source
pub fn uint32(bits: &Bits) -> u32
Expand description

Converts up to the first 32 bits of a bit string to a 32 bit unsigned integer.

ยงExample

let bits = Bits::new([0x10, 0x32, 0x54, 0x76]);
let uint = bits_as::uint32(&bits);

assert_eq!(uint, 0x76543210);

let bits = Bits::from([0x10, 0x32, 0x54, 0x76]);
let uint = bits_as::uint32(&bits);

assert_eq!(uint, 0x76543210);