A collection of tools to help dealing with our beloved ❤️ fixed size arrays (Including generic contexts).
This crate heavely uses
FixedSizeArray trait, which is currently experimental.
Because of this, crate is experimental as well.
No other sources of severe breakage should be expected.
- Metafeature: all features below should work for arrays of any size.
- Initialization with iterator.
- Initialization with function (with or without index as argument).
- Consuming iterator.
- Consuming chunks iterator.
- Consuming split.
- Consuming join.
- No dependency on
stdand no heap allocations, thanks to underlaying fixed-capacity stack-allocated deque-like structure.
See documentation for examples, it covers most if not all use cases.
Contributions of any shape and form are welcome.
A consuming iterator over non-overlaping subarrays of equal size.
A consuming iterator over array elements.
An item of
Creates a new array instance filled with values generated by a given function. This variant expects a function with single argument - an index of element to initialize.
Creates a new array instance filled with values generated by a given function. This variant expects function without arguments.
Joins two arrays.
Returns the length of array.
Splits array into two subarrays.
Attempts to create instance of array from iterator.
Attempts to create instance of array from slice.