Trait AlignTo
pub trait AlignTo: Copy {
// Required method
fn align_to(self, alignment: Self) -> Self;
}Expand description
Trait for adjusting integers to the next multiple of an alignment.
Required Methods§
fn align_to(self, alignment: Self) -> Self
fn align_to(self, alignment: Self) -> Self
Aligns self to alignment.
Panics if doing so would overflow.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.