Now that const_generics is stable I propose for v0.9 we switch to using const_generics in the definition of the Pixel trait to return arrays rather than slices. Something like:
Since &[S: N] arrays can be trivially converted to &[S] slices (using as_slice() or From/Into) but not vice versa (requires TryFrom) this is strictly more powerful than returning slices.
Now that
const_generics
is stable I propose forv0.9
we switch to usingconst_generics
in the definition of thePixel
trait to return arrays rather than slices. Something like:Since
&[S: N]
arrays can be trivially converted to&[S]
slices (usingas_slice()
orFrom
/Into
) but not vice versa (requiresTryFrom
) this is strictly more powerful than returning slices.