pub trait Alignable {
// Required method
fn align_to(&self, alignment: Self) -> Self;
}
Expand description
Trait for aligning a numeric value to a given byte boundary
§Example
assert_eq!(8, 5_u32.align_to(8));
Required Methods§
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.