#[repr(transparent)]pub struct IOAddr(pub u32);
Expand description
A wrapper for an IO address (IOVA / DMA Address for devices)
Tuple Fields§
§0: u32
Implementations§
Source§impl IOAddr
impl IOAddr
Sourcepub fn base_page_offset(self) -> u32
pub fn base_page_offset(self) -> u32
Offset within the 4 KiB page.
Sourcepub fn large_page_offset(self) -> u32
pub fn large_page_offset(self) -> u32
Offset within the 4 MiB page.
Sourcepub fn align_down_to_base_page(self) -> Self
pub fn align_down_to_base_page(self) -> Self
Return address of nearest 4 KiB page (lower or equal than self).
Sourcepub fn align_down_to_large_page(self) -> Self
pub fn align_down_to_large_page(self) -> Self
Return address of nearest 4 MiB page (lower or equal than self).
Sourcepub fn align_up_to_base_page(self) -> Self
pub fn align_up_to_base_page(self) -> Self
Return address of nearest 4 KiB page (higher or equal than self).
Sourcepub fn align_up_to_large_page(self) -> Self
pub fn align_up_to_large_page(self) -> Self
Return address of nearest 4 MiB page (higher or equal than self).
Sourcepub fn is_base_page_aligned(self) -> bool
pub fn is_base_page_aligned(self) -> bool
Is this address aligned to a 4 KiB page?
Sourcepub fn is_large_page_aligned(self) -> bool
pub fn is_large_page_aligned(self) -> bool
Is this address aligned to a 4 MiB page?
Trait Implementations§
Source§impl AddAssign<u32> for IOAddr
impl AddAssign<u32> for IOAddr
Source§fn add_assign(&mut self, offset: u32)
fn add_assign(&mut self, offset: u32)
Performs the
+=
operation. Read moreSource§impl AddAssign for IOAddr
impl AddAssign for IOAddr
Source§fn add_assign(&mut self, other: IOAddr)
fn add_assign(&mut self, other: IOAddr)
Performs the
+=
operation. Read moreSource§impl Ord for IOAddr
impl Ord for IOAddr
Source§impl PartialOrd for IOAddr
impl PartialOrd for IOAddr
impl Copy for IOAddr
impl Eq for IOAddr
impl StructuralPartialEq for IOAddr
Auto Trait Implementations§
impl Freeze for IOAddr
impl RefUnwindSafe for IOAddr
impl Send for IOAddr
impl Sync for IOAddr
impl Unpin for IOAddr
impl UnwindSafe for IOAddr
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