#[repr(transparent)]pub struct PhysAddr(u64);Expand description
A type representing physical addresses in the CPU’s physical address space
Tuple Fields§
§0: u64Implementations§
Source§impl PhysAddr
impl PhysAddr
Sourcepub fn as_mut_ptr<T>(self) -> *mut T
pub fn as_mut_ptr<T>(self) -> *mut T
Returns the address as a *mut T pointer
Sourcepub fn as_hhdm_ptr<T>(self) -> *const T
pub fn as_hhdm_ptr<T>(self) -> *const T
Returns the address as a *const T pointer with the HHDM offset added
Sourcepub fn as_mut_hhdm_ptr<T>(self) -> *mut T
pub fn as_mut_hhdm_ptr<T>(self) -> *mut T
Returns the address as a *mut T pointer with the HHDM offset added
Sourcepub fn align_up(self, align: u64) -> Self
pub fn align_up(self, align: u64) -> Self
Returns a new address aligned to the next larger address which is aligned to align
§Panics
In debug builds if align is not a power of two
Sourcepub fn align_down(self, align: u64) -> Self
pub fn align_down(self, align: u64) -> Self
Returns a new address aligned to the next smaller address which is aligned to align
§Panics
In debug builds if align is not a power of two
Sourcepub fn is_aligned(self, align: u64) -> bool
pub fn is_aligned(self, align: u64) -> bool
Check whether the address is aligned to align
Trait Implementations§
Source§impl AddAssign for PhysAddr
impl AddAssign for PhysAddr
Source§fn add_assign(&mut self, rhs: PhysAddr)
fn add_assign(&mut self, rhs: PhysAddr)
AddAssign trait for add-assigning a PhysAddr to a PhysAddr
Source§impl AddAssign<u64> for PhysAddr
impl AddAssign<u64> for PhysAddr
Source§fn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
AddAssign trait for add-assigning a u64 to a PhysAddr
impl Copy for PhysAddr
impl Eq for PhysAddr
Source§impl Ord for PhysAddr
impl Ord for PhysAddr
1.21.0 (const: unstable)§fn 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 (const: unstable)§fn 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
Source§impl PartialOrd for PhysAddr
impl PartialOrd for PhysAddr
impl StructuralPartialEq for PhysAddr
Source§impl SubAssign for PhysAddr
impl SubAssign for PhysAddr
Source§fn sub_assign(&mut self, rhs: PhysAddr)
fn sub_assign(&mut self, rhs: PhysAddr)
SubAssign trait for sub-assigning a PhysAddr from a PhysAddr
Auto Trait Implementations§
impl Freeze for PhysAddr
impl RefUnwindSafe for PhysAddr
impl Send for PhysAddr
impl Sync for PhysAddr
impl Unpin for PhysAddr
impl UnsafeUnpin for PhysAddr
impl UnwindSafe for PhysAddr
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)