Skip to main content

calc_aligned_size

Function calc_aligned_size 

Source
pub const fn calc_aligned_size<T>(count: usize, alignment: u32) -> usize
Expand description

Returns the smallest multiple of alignment (in bytes) that can hold count elements of type T.

This is the Rust equivalent of the C++ calc_aligned_size<T>() template.