pub fn round_up<T: Into<U>, U: Copy + PrimInt>(
offset: U,
block_size: T,
) -> Option<U>
Expand description
Round offset
up to next multiple of block_size
.
This function will fail if rounding up leads to an integer overflow.
(Note that unstable rust is currently adding the same function
{integer}::checked_next_multiple_of()
behind the “int_roundings” feature.)