Function as_u32

Source
pub fn as_u32(buf: &[u8]) -> u32
Expand description

slice as u32.

ยงUnit Test

let int = faster_stun::util::as_u32(&[0x00, 0x00, 0x00, 0x04]);

assert_eq!(int, 4);