macro_rules! box_arr {
    ($($x:expr),* $(,)*) => { ... };
    ($x:expr; $N:ty) => { ... };
}
Expand description

Like arr!, but returns a Box<GenericArray<T, N>>

Unlike arr!, this is not limited by stack size, only the heap.

Example:

// allocate a 16MB Buffer of u128 elements (16 bytes * 10 ^ 6)
let test = box_arr![1u128; typenum::Exp<U10, U6>];
//  test: Box<GenericArray<u128, _>>