Expand description
A safe approach to using #[repr(packed)]
data.
See nue_macros
for the automagic #[packed]
attribute.
Traits§
- Aligned
- A trait for converting types with alignments greater than
1
into their unaligned equivalent. - Packed
- A marker trait indicating that a type is
#[repr(packed)]
. - Unaligned
- A marker trait indicating that a type has an alignment of
1
.
Functions§
- is_
aligned_ for - Determines whether a pointer or reference is correctly aligned for type
T
. - is_
aligned_ for_ slice - Determines whether a slice is correctly aligned for type
T
. - size_
of_ slice - Calculates the total byte size of a slice.
Type Aliases§
- Un
- A type alias that represents the unaligned type of
T
.