Skip to content

must_cast from NoUninit+Zeroable to array? #237

Answered by zachs18
James-E-A asked this question in Q&A
Discussion options

You must be logged in to vote

You can use bytemuck::must_cast_ref, assuming you have the min_const_generics feature enabled, to cast from &T (including &[U; _]) to &[u8; N]

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@James-E-A
Comment options

Answer selected by James-E-A
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants