pub fn copy_to_align<A: Alignment>(data: &[u8]) -> Cow<'_, AlignedSlice<A>>
Expand description

Aligns the given data to the alignment as given by the type parameter A.

This is convenient for when you can’t ensure the alignment of your data in advance. By using Cow we only have to make a copy of the data if it is not aligned.