Function unpack_octets_as_u32
pub fn unpack_octets_as_u32(buf: &[u8], offset: usize) -> u32
Expand description
A helper function that unpacks a sequence of 4 bytes found in the buffer with
starting at the given offset, into a u32.
§Examples
use rama_utils::octets::unpack_octets_as_u32;
let buf: [u8; 4] = [0, 0, 0, 1];
assert_eq!(1u32, unpack_octets_as_u32(&buf, 0));
§Panics
In case the buffer is too small.