Skip to main content

u128_checked_align_up

Function u128_checked_align_up 

Source
pub const fn u128_checked_align_up(addr: u128, align: u128) -> Option<u128>
Expand description

Checked align address upwards.

Returns the smallest x with alignment align so that x >= addr.

Returns None if an overflow occurs.

Panics if the alignment is not a power of two.

This is a const version of Align::checked_align_up.