Skip to main content

align_index

Function align_index 

Source
pub const fn align_index(align: usize, index: usize) -> usize
Expand description

Aligns an index to the specified alignment boundary. Returns the next aligned position that satisfies the alignment requirement.

ยงPanics

Panics (in debug configuration) if the alignment is not a power of two.