mirror of
https://github.com/Lokathor/bytemuck.git
synced 2024-11-21 22:32:23 +00:00
comments
This commit is contained in:
parent
d4fde53386
commit
40cb0d19c3
@ -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)`, `repr(transparent)` wrapper around a
|
||||
/// `Pod` type, or `repr(packed)` with all fields as `Pod` types.
|
||||
/// * A struct needs to have all fields be `Pod` and be `repr(C)`,
|
||||
/// `repr(transparent)`, or `repr(packed)`.
|
||||
pub unsafe trait Pod: Zeroable + Copy + 'static {}
|
||||
|
||||
unsafe impl Pod for () {}
|
||||
|
Loading…
Reference in New Issue
Block a user