sub-array
Allows to extract a sub-array out of an array
Example
Getting a sub array:
use SubArray;
let arr: = ;
// Get a sub-array starting at offset 1
let sub: & = arr.sub_array_ref;
assert_eq!;
Initializing an [u8;10]
array with (u16, u32, u32)
:
use SubArray;
let foo: u16 = 42;
let bar: u32 = 0x1234;
let baz: u32 = 0x5678;
let mut arr = ;
*arr. = foo.to_be_bytes;
*arr. = bar.to_be_bytes;
*arr. = baz.to_be_bytes;
assert_eq!;
License
Licensed under Apache License, Version 2.0 (LICENSE or https://www.apache.org/licenses/LICENSE-2.0).
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.