pub struct PciMemoryRegion<'a> { /* private fields */ }
Implementations§
Source§impl PciMemoryRegion<'_>
impl PciMemoryRegion<'_>
pub fn new(data: &[u8]) -> PciMemoryRegion<'_>
pub fn new_mut(data: &mut [u8]) -> PciMemoryRegion<'_>
Sourcepub unsafe fn new_raw<'a>(
data: *mut u8,
length: usize,
permissions: Permissions,
) -> PciMemoryRegion<'a>
pub unsafe fn new_raw<'a>( data: *mut u8, length: usize, permissions: Permissions, ) -> PciMemoryRegion<'a>
§Safety
The returned PciMemoryRegion
must not outlive the data.
Trait Implementations§
Source§impl<'a> AsPciSubregion<'a> for &'a PciMemoryRegion<'_>
impl<'a> AsPciSubregion<'a> for &'a PciMemoryRegion<'_>
Source§fn as_subregion(&self) -> PciSubregion<'a>
fn as_subregion(&self) -> PciSubregion<'a>
Returns a
PciSubregion
corresponding to self
.Source§fn subregion(&self, range: impl RangeBounds<u64>) -> PciSubregion<'a>
fn subregion(&self, range: impl RangeBounds<u64>) -> PciSubregion<'a>
Returns a
PciSubregion
corresponding to a range of self
.Source§impl<'a> Clone for PciMemoryRegion<'a>
impl<'a> Clone for PciMemoryRegion<'a>
Source§fn clone(&self) -> PciMemoryRegion<'a>
fn clone(&self) -> PciMemoryRegion<'a>
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<'a> Debug for PciMemoryRegion<'a>
impl<'a> Debug for PciMemoryRegion<'a>
Source§impl PciRegion for PciMemoryRegion<'_>
impl PciRegion for PciMemoryRegion<'_>
Source§fn permissions(&self) -> Permissions
fn permissions(&self) -> Permissions
Whether the region may be read, written, or both.
Source§fn read_bytes(&self, offset: u64, buffer: &mut [u8]) -> Result<()>
fn read_bytes(&self, offset: u64, buffer: &mut [u8]) -> Result<()>
Read from a contiguous range of the region into a byte buffer. Read more
impl<'a> Copy for PciMemoryRegion<'a>
impl Send for PciMemoryRegion<'_>
impl Sync for PciMemoryRegion<'_>
Auto Trait Implementations§
impl<'a> Freeze for PciMemoryRegion<'a>
impl<'a> RefUnwindSafe for PciMemoryRegion<'a>
impl<'a> Unpin for PciMemoryRegion<'a>
impl<'a> UnwindSafe for PciMemoryRegion<'a>
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