Function safe_transmute::align::check_alignment [−][src]
pub fn check_alignment<S, T>(data: &[S]) -> Result<(), UnalignedError<'_, S, T>>
Check whether the given data slice of Ss is properly aligned for reading
and writing as a slice of Ts.
Errors
An Error::Unaligned error is returned with the number of bytes to discard
from the front in order to make the conversion safe from alignment concerns.