mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 22:32:23 +00:00
mention repr(packed)
This commit is contained in:
parent
28603a3198
commit
ca902ff52d
@ -18,8 +18,8 @@ use super::*;
|
||||
/// [Infallible](core::convert::Infallible)).
|
||||
/// * The type must allow any bit pattern (eg: no `bool` or `char`).
|
||||
/// * The type must not contain any padding bytes (eg: no `(u8, u16)`).
|
||||
/// * A struct needs to be `repr(C)`, or a `repr(transparent)` wrapper around a
|
||||
/// `Pod` type.
|
||||
/// * A struct needs to be `repr(C)`, `repr(transparent)` wrapper around a
|
||||
/// `Pod` type, or `repr(packed)` with all fields as `Pod` types.
|
||||
pub unsafe trait Pod: Zeroable + Copy + 'static {}
|
||||
|
||||
unsafe impl Pod for () {}
|
||||
|
Loading…
Reference in New Issue
Block a user