Function format_struct::safe_size_to_count
source · pub const fn safe_size_to_count<T: Sized>(
size: usize
) -> Result<usize, UnalignedSizeError>Expand description
Checks that the specified size if a multiple of a type’s size and returns the size divided by the type’s size or an error if that is not the case.