Replies: 1 comment
-
Having rust-lang/rust#74985 stabilized would also help with this, since it's essentially the same as some of what I want it to do, but we'll have to make do until that happens. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to reduce the Pixel trait down to something that just converts to and from arrays. It should be more viable now when it's easier to work with arrays, due to const generics and API improvements. The idea I have so far is to have a minimal
ArrayRepr
trait (a better name is welcome) that takes care of the unsafe array casting, and add on aSliceExt
trait and possibly aVecExt
trait with more collection specific stuff. The only snag is thatAlpha
need to have an array representation that is[T; N+1]
and there isn't a nice way of representing it, but I think it would be ok to work around with some kind ofNextArraySize
trait that is implemented for a handful of sizes.I'm putting it here to see if there's any input or if other people have thought of any better techniques.
Here's a sketch of how I'm imagining it so far:
Beta Was this translation helpful? Give feedback.
All reactions