pub trait IntAlignment: Sized {
// Required methods
fn align_down<T: Into<Self>>(self, alignment: T) -> Option<Self>;
fn align_up<T: Into<Self>>(self, alignment: T) -> Option<Self>;
}Required Methods§
Sourcefn align_down<T: Into<Self>>(self, alignment: T) -> Option<Self>
fn align_down<T: Into<Self>>(self, alignment: T) -> Option<Self>
Align self down to the closest value less or equal to self that is aligned to
alignment. Returns None if and only if there is no such value.
alignment must be a power of two.
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.