sparreal_kernel::mem

Trait Align

Source
pub trait Align: Clone + Copy
where usize: From<Self>,
{ // Provided methods fn align_down(self, align: usize) -> Self where Self: From<usize> { ... } fn align_up(self, align: usize) -> Self where Self: From<usize> { ... } fn is_aligned_4k(self) -> bool { ... } fn is_aligned_to(self, align: usize) -> bool { ... } }

Provided Methods§

Source

fn align_down(self, align: usize) -> Self
where Self: From<usize>,

Source

fn align_up(self, align: usize) -> Self
where Self: From<usize>,

Source

fn is_aligned_4k(self) -> bool

Source

fn is_aligned_to(self, align: usize) -> bool

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.

Implementors§

Source§

impl<T> Align for T
where T: Into<usize> + From<usize> + Copy, usize: From<T>,