Open dafaust opened 2 years ago
https://doc.rust-lang.org/reference/type-layout.html#representations
structs
repr(align)
repr(packed)
repr(C)
repr(transparent)
repr(C, packed(2))
unions
enums
repr(u8)
repr(C, u8)
repr(transparent) allows multiple members for as long as all but one member are zero sized.
Ah, good point. Thanks.
https://doc.rust-lang.org/reference/type-layout.html#representations
structs
repr(align)
repr(packed)
repr(C)
repr(transparent)
- single member onlyrepr(C, packed(2))
unions
repr(align)
repr(packed)
repr(C)
repr(C, packed(2))
enums
repr(align)
repr(u8)
repr(transparent)
- single variant onlyrepr(C, u8)