Expand description
Array fusion and fission utilies.
This crate contains utilities to combine multiple arrays together (aka fusion) as well as splitting them (aka fission).
This crate is based on the hybrid_array crate, which provides
all the building blocks for this crate. The hybrid_array crate
has its own Array type for an array type that uses the
typenum type parameters to represent the size of the array,
instead of the const generic array size of classic “core” arrays.
The reason of using typenum is that you can use typenums
type parameters in generic context unlike the classic const
generics which at the time of writing (2025) have still many
limitations that limits the usability of them in generic context.
However when working within the limited scopes (and in
non-generic context) the “core” arrays have much better ergonomics.
Due to this ambivalence, this crate offers most functions in two variants
the “normal” way is baed on hybrid_arrays Array and the “core” variant
the work with the ordinary arrays.
This crate also offers convenient functions for converting between the
“core” and hybrid_array arrays via array_from_core and
array_to_core. Their trait bounds demonstrate the complexity of
interchanging between these type. Tho, if you have a concrete array all
these bounds can be inferred, and if you dont have a concrete array e.g.
due to generic context, you better use the hybrid_array array.
Re-exports§
pub use hybrid_array;
Modules§
Macros§
- merge_
array - Merge multiple
Arrays into one combinedArray. - merge_
bytes - merge_
core_ array - Merge core arrays into a combined core array
- split_
array - Splits an
Arrayinto multiple sub-Arrays. - split_
bytes - split_
core_ array - Split a core arrays in core arrays.
Functions§
- array_
from_ core - Convert a core array into an
Array. - array_
to_ core - Convert an
Arrayinto a core array.