Repository navigation
|
I've got a struct that's Copy, Clone, repr(C,packed), bytemuck::NoUninit, and bytemuck::Zeroable — but it is not bytemuck::AnyBitPattern due to being slightly value-constrained (certain fields have certain bits clamped to 0 when creating the type). I have an array of this struct, and I need to lend this array as a Is there any plan for a |
Replies: 2 comments 1 reply
|
You can use |
|
In addition to what zachs said, casting any type that |
You can use
bytemuck::must_cast_ref, assuming you have themin_const_genericsfeature enabled, to cast from&T(including&[U; _]) to&[u8; N]