pub struct GuestPhysAddr(/* private fields */);
Expand description
Guest physical address.
Implementations§
Source§impl GuestPhysAddr
impl GuestPhysAddr
Sourcepub const fn from_usize(addr: usize) -> Self
pub const fn from_usize(addr: usize) -> Self
Converts an usize
to an GuestPhysAddr
.
Sourcepub const fn as_usize(self) -> usize
pub const fn as_usize(self) -> usize
Converts an GuestPhysAddr
to an usize
.
Trait Implementations§
Source§impl Add<usize> for GuestPhysAddr
impl Add<usize> for GuestPhysAddr
Source§impl AddAssign<usize> for GuestPhysAddr
impl AddAssign<usize> for GuestPhysAddr
Source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moreSource§impl Clone for GuestPhysAddr
impl Clone for GuestPhysAddr
Source§fn clone(&self) -> GuestPhysAddr
fn clone(&self) -> GuestPhysAddr
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GuestPhysAddr
impl Debug for GuestPhysAddr
Source§impl Default for GuestPhysAddr
impl Default for GuestPhysAddr
Source§fn default() -> GuestPhysAddr
fn default() -> GuestPhysAddr
Returns the “default value” for a type. Read more
Source§impl From<GuestPhysAddr> for usize
impl From<GuestPhysAddr> for usize
Source§fn from(addr: GuestPhysAddr) -> usize
fn from(addr: GuestPhysAddr) -> usize
Converts to this type from the input type.
Source§impl From<usize> for GuestPhysAddr
impl From<usize> for GuestPhysAddr
Source§impl LowerHex for GuestPhysAddr
impl LowerHex for GuestPhysAddr
Source§impl Ord for GuestPhysAddr
impl Ord for GuestPhysAddr
Source§fn cmp(&self, other: &GuestPhysAddr) -> Ordering
fn cmp(&self, other: &GuestPhysAddr) -> Ordering
1.21.0 · Source§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
Source§impl PartialEq for GuestPhysAddr
impl PartialEq for GuestPhysAddr
Source§impl PartialOrd for GuestPhysAddr
impl PartialOrd for GuestPhysAddr
Source§impl Sub<usize> for GuestPhysAddr
impl Sub<usize> for GuestPhysAddr
Source§impl Sub for GuestPhysAddr
impl Sub for GuestPhysAddr
Source§impl SubAssign<usize> for GuestPhysAddr
impl SubAssign<usize> for GuestPhysAddr
Source§fn sub_assign(&mut self, rhs: usize)
fn sub_assign(&mut self, rhs: usize)
Performs the
-=
operation. Read moreSource§impl UpperHex for GuestPhysAddr
impl UpperHex for GuestPhysAddr
impl Copy for GuestPhysAddr
impl DeviceAddr for GuestPhysAddr
impl Eq for GuestPhysAddr
impl StructuralPartialEq for GuestPhysAddr
Auto Trait Implementations§
impl Freeze for GuestPhysAddr
impl RefUnwindSafe for GuestPhysAddr
impl Send for GuestPhysAddr
impl Sync for GuestPhysAddr
impl Unpin for GuestPhysAddr
impl UnwindSafe for GuestPhysAddr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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