pub trait AlignMem: Sized {
    // Required methods
    fn align_up(self, alignment: usize) -> Self;
    fn align_down(self, alignment: usize) -> Self;
    fn is_aligned(&self, alignment: usize) -> bool;
    fn align_range(self, size: usize, alignment: usize) -> (Self, usize, usize);
}

Required Methods§

source

fn align_up(self, alignment: usize) -> Self

source

fn align_down(self, alignment: usize) -> Self

source

fn is_aligned(&self, alignment: usize) -> bool

source

fn align_range(self, size: usize, alignment: usize) -> (Self, usize, usize)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AlignMem for u64

source§

fn align_up(self, alignment: usize) -> Self

source§

fn align_down(self, alignment: usize) -> Self

source§

fn is_aligned(&self, alignment: usize) -> bool

source§

fn align_range(self, size: usize, alignment: usize) -> (Self, usize, usize)

source§

impl AlignMem for usize

source§

fn align_up(self, alignment: usize) -> Self

source§

fn align_down(self, alignment: usize) -> Self

source§

fn is_aligned(&self, alignment: usize) -> bool

source§

fn align_range(self, size: usize, alignment: usize) -> (Self, usize, usize)

Implementors§