Macro byteorder::read_slice

source ·
macro_rules! read_slice {
    ($src:expr, $dst:expr, $ty:ty, $from_bytes:ident) => { ... };
}
Expand description

Copies a &u8 $src into a &mut [$ty] $dst for the endianness given by $from_bytes (must be either from_be_bytes or from_le_bytes).

Panics if $src.len() != $dst.len() * size_of::<$ty>().