5 releases (3 breaking)
Uses new Rust 2021
|0.4.1||Jul 23, 2022|
|0.4.0||Jul 22, 2022|
|0.3.0||Jul 22, 2022|
|0.2.0||Jul 21, 2022|
|0.1.0||Jul 20, 2022|
#735 in Rust patterns
22 downloads per month
This crate exposes 2 traits that allow manipulating arrays in a vec-like fashion.
Alternatives like ArrayVec operate over a
[MaybeUninit<T>; N]-like data structure and panic if the size is overflown. The point of this crate is allowing to "resize" arrays.
If you heavily depend on this crate, probably a linked list will be a much better fit, but this crate is still very useful for one-time operations, operations where using a linked list will give more problems than solutions, coercing arrays or devices where you can't allocate.
This crate works & performs exceptionally well when you have an array that you need to manipulate but you still need to use a fixed array later and not a Vec. In that situation you just avoided 1
malloc() & 3
memcpy()s best-case scenario and n
memcpy()s and a conditional worst-case scenario.