Skip to main content

Module arrays

Module arrays 

Source
Expand description

ALTREP impls for const-generic arrays [T; N].

Arrays use const generics (impl<const N: usize>), so they canโ€™t ride the impl_alt*_from_data! macro path (which uses $ty:ty and needs a concrete type to delegate through). Numeric families share enough structure to be covered by the local impl_altrep_array_numeric! helper macro defined below; bool and String arrays differ structurally and are hand-written.

Macrosยง

altrep_array_no_na ๐Ÿ”’
no_na fragment for families that support it (Integer, Real).
impl_altrep_array_numeric ๐Ÿ”’
Generate all ALTREP trait impls + InferBase for a numeric [T; N] array family. Pass optional extra items via extra { ... } to include in the family trait impl.