Function as_u64

Source
pub fn as_u64(buf: &[u8]) -> u64
Expand description

slice as u64.

ยงUnit Test

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

assert_eq!(int, 4);