Static Array
A no-std rust crate providing a heap-allocated non-resizable type-checked array.
The documentation is available at https://docs.rs/static-array/0.5.0.
The following types are provided:
HeapArray- A one dimensional heap-allocated array.HeapArray2D- A two dimensional heap-allocated array.HeapArray3D- A three dimensional heap-allocated array.
This crate does not depend on std but does require alloc in order to create the array.
Examples
Creating a large array on the heap using a function.
use HeapArray;
// Creates an array 16 MB (on 64 bit systems) in size
// which is larger than the standard linux stack size.
let array: = from_fn;
assert_eq!;
Creating a large array from the default value of a type.
use HeapArray;
let array: = default;
assert_eq!;