pub struct Alignment(/* private fields */);
Expand description
Implementations§
Source§impl Alignment
impl Alignment
Sourcepub const fn new(alignment: usize) -> Self
pub const fn new(alignment: usize) -> Self
Creates new value, with panic if alignment
doesn’t fit requirements
Sourcepub const fn try_new(alignment: usize) -> Option<Self>
pub const fn try_new(alignment: usize) -> Option<Self>
Creates new value, returning None
if value doesn’t fit requirements
Sourcepub const fn next(&self, size: usize) -> usize
pub const fn next(&self, size: usize) -> usize
Returns value at or after size
that is a multiple of alignment.
Trait Implementations§
impl Copy for Alignment
impl Eq for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations§
impl Freeze for Alignment
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnwindSafe for Alignment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more