Is there a way to create a mutable reference for a type that doesn't match underlying storage?

后端 未结 0 1596
暗喜
暗喜 2020-12-31 01:14

Consider a struct that is implemented as a [u8; 2]. Is it possible to construct a &mut u16 mutable reference to the whole struct? Is there a sa

相关标签:
回答
  • 消灭零回复
提交回复
热议问题