pub struct Phys<T>(/* private fields */);Implementations§
Source§impl<T> Phys<T>
impl<T> Phys<T>
pub const fn new(val: usize) -> Self
pub fn raw(self) -> usize
pub fn align_down(self, align: usize) -> Self
pub fn align_up(self, align: usize) -> Self
pub fn align_offset(self, align: usize) -> usize
pub fn is_aligned_4k(self) -> bool
pub fn is_aligned_to(self, align: usize) -> bool
Trait Implementations§
Source§impl<T: Ord> Ord for Phys<T>
impl<T: Ord> Ord for Phys<T>
Source§impl<T: PartialOrd> PartialOrd for Phys<T>
impl<T: PartialOrd> PartialOrd for Phys<T>
impl<T: Copy> Copy for Phys<T>
impl<T: Eq> Eq for Phys<T>
impl<T> StructuralPartialEq for Phys<T>
Auto Trait Implementations§
impl<T> Freeze for Phys<T>
impl<T> RefUnwindSafe for Phys<T>where
T: RefUnwindSafe,
impl<T> Send for Phys<T>where
T: Send,
impl<T> Sync for Phys<T>where
T: Sync,
impl<T> Unpin for Phys<T>where
T: Unpin,
impl<T> UnwindSafe for Phys<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> Background for T
impl<T> Background for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Foreground for T
impl<T> Foreground for T
Source§impl<T> MemoryAddr for T
impl<T> MemoryAddr for T
Source§fn align_down<U>(self, align: U) -> Self
fn align_down<U>(self, align: U) -> Self
Aligns the address downwards to the given alignment.
Source§fn align_offset<U>(self, align: U) -> usize
fn align_offset<U>(self, align: U) -> usize
Returns the offset of the address within the given alignment.
Source§fn is_aligned<U>(self, align: U) -> bool
fn is_aligned<U>(self, align: U) -> bool
Checks whether the address has the demanded alignment.
Source§fn align_down_4k(self) -> Self
fn align_down_4k(self) -> Self
Aligns the address downwards to 4096 (bytes).
Source§fn align_up_4k(self) -> Self
fn align_up_4k(self) -> Self
Aligns the address upwards to 4096 (bytes).
Source§fn align_offset_4k(self) -> usize
fn align_offset_4k(self) -> usize
Returns the offset of the address within a 4K-sized page.
Source§fn is_aligned_4k(self) -> bool
fn is_aligned_4k(self) -> bool
Checks whether the address is 4K-aligned.
Source§fn offset(self, offset: isize) -> Self
fn offset(self, offset: isize) -> Self
Adds a given offset to the address to get a new address. Read more
Source§fn wrapping_offset(self, offset: isize) -> Self
fn wrapping_offset(self, offset: isize) -> Self
Adds a given offset to the address to get a new address. Read more
Source§fn offset_from(self, base: Self) -> isize
fn offset_from(self, base: Self) -> isize
Gets the distance between two addresses. Read more
Source§fn add(self, rhs: usize) -> Self
fn add(self, rhs: usize) -> Self
Adds a given unsigned offset to the address to get a new address. Read more
Source§fn wrapping_add(self, rhs: usize) -> Self
fn wrapping_add(self, rhs: usize) -> Self
Adds a given unsigned offset to the address to get a new address. Read more
Source§fn overflowing_add(self, rhs: usize) -> (Self, bool)
fn overflowing_add(self, rhs: usize) -> (Self, bool)
Adds a given unsigned offset to the address to get a new address. Read more
Source§fn checked_add(self, rhs: usize) -> Option<Self>
fn checked_add(self, rhs: usize) -> Option<Self>
Adds a given unsigned offset to the address to get a new address. Read more
Source§fn sub(self, rhs: usize) -> Self
fn sub(self, rhs: usize) -> Self
Subtracts a given unsigned offset from the address to get a new address. Read more
Source§fn wrapping_sub(self, rhs: usize) -> Self
fn wrapping_sub(self, rhs: usize) -> Self
Subtracts a given unsigned offset from the address to get a new address. Read more
Source§fn overflowing_sub(self, rhs: usize) -> (Self, bool)
fn overflowing_sub(self, rhs: usize) -> (Self, bool)
Subtracts a given unsigned offset from the address to get a new address. Read more
Source§fn checked_sub(self, rhs: usize) -> Option<Self>
fn checked_sub(self, rhs: usize) -> Option<Self>
Subtracts a given unsigned offset from the address to get a new address. Read more
Source§fn sub_addr(self, rhs: Self) -> usize
fn sub_addr(self, rhs: Self) -> usize
Subtracts another address from the address to get the offset between them. Read more
Source§fn wrapping_sub_addr(self, rhs: Self) -> usize
fn wrapping_sub_addr(self, rhs: Self) -> usize
Subtracts another address from the address to get the offset between them. Read more