#[repr(u16)]
pub enum Alignment {
B1,
B2,
B4,
B8,
}
Expand description
Alignment of representables on page. The only implication is on how the write_value
and read_value
methods are going to be implemented.
Variants
B1
1 byte-aligned
B2
2 bytes-aligned (i.e. this is a pointer to a u16 or i16)
B4
4 bytes-aligned (i.e. this is a pointer to a u32 or i32)
B8
8 bytes-aligned (i.e. this is a pointer to a u64 or i64)
Trait Implementations
sourceimpl Ord for Alignment
impl Ord for Alignment
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Alignment> for Alignment
impl PartialOrd<Alignment> for Alignment
sourcefn partial_cmp(&self, other: &Alignment) -> Option<Ordering>
fn partial_cmp(&self, other: &Alignment) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Alignment
impl Eq for Alignment
impl StructuralEq for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnwindSafe for Alignment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more