pub struct GuestAddress(pub u64);Expand description
A guest physical address.
Tuple Fields§
§0: u64Implementations§
Source§impl GuestAddress
impl GuestAddress
Sourcepub const fn offset(&self, offset: u64) -> Self
pub const fn offset(&self, offset: u64) -> Self
Returns the address offset by the given amount.
Sourcepub const fn align_up(&self, alignment: u64) -> Self
pub const fn align_up(&self, alignment: u64) -> Self
Aligns the address up to the given alignment.
Sourcepub const fn align_down(&self, alignment: u64) -> Self
pub const fn align_down(&self, alignment: u64) -> Self
Aligns the address down to the given alignment.
Sourcepub const fn is_aligned(&self, alignment: u64) -> bool
pub const fn is_aligned(&self, alignment: u64) -> bool
Checks if the address is aligned to the given alignment.
Trait Implementations§
Source§impl Clone for GuestAddress
impl Clone for GuestAddress
Source§fn clone(&self) -> GuestAddress
fn clone(&self) -> GuestAddress
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 GuestAddress
impl Debug for GuestAddress
Source§impl Default for GuestAddress
impl Default for GuestAddress
Source§fn default() -> GuestAddress
fn default() -> GuestAddress
Returns the “default value” for a type. Read more
Source§impl Display for GuestAddress
impl Display for GuestAddress
Source§impl From<GuestAddress> for u64
impl From<GuestAddress> for u64
Source§fn from(addr: GuestAddress) -> Self
fn from(addr: GuestAddress) -> Self
Converts to this type from the input type.
Source§impl From<u64> for GuestAddress
impl From<u64> for GuestAddress
Source§impl Hash for GuestAddress
impl Hash for GuestAddress
Source§impl Ord for GuestAddress
impl Ord for GuestAddress
Source§fn cmp(&self, other: &GuestAddress) -> Ordering
fn cmp(&self, other: &GuestAddress) -> 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 GuestAddress
impl PartialEq for GuestAddress
Source§impl PartialOrd for GuestAddress
impl PartialOrd for GuestAddress
impl Copy for GuestAddress
impl Eq for GuestAddress
impl StructuralPartialEq for GuestAddress
Auto Trait Implementations§
impl Freeze for GuestAddress
impl RefUnwindSafe for GuestAddress
impl Send for GuestAddress
impl Sync for GuestAddress
impl Unpin for GuestAddress
impl UnsafeUnpin for GuestAddress
impl UnwindSafe for GuestAddress
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