get_bytes

Macro get_bytes 

Source
macro_rules! get_bytes {
    ($buf:expr, $off:expr, 1) => { ... };
    ($buf:expr, $off:expr, 2) => { ... };
    ($buf:expr, $off:expr, 3) => { ... };
    ($buf:expr, $off:expr, 4) => { ... };
    ($buf:expr, $off:expr, $len:expr) => { ... };
}
Expand description

Return a subslice or an array of the given bytes: get_bytes!(buf, OFFSET, LEN)

assert_eq!([2, 3], get_bytes!(&[1, 2, 3], 1, 2))