pub struct DevMemMemoryMapper { /* private fields */ }Expand description
A memory mapper that maps over the /dev/mem physical memory device.
Only available on Linux with std feature enabled.
Trait Implementations§
Source§impl Debug for DevMemMemoryMapper
impl Debug for DevMemMemoryMapper
Source§impl Drop for DevMemMemoryMapper
impl Drop for DevMemMemoryMapper
Source§impl<R: RangeBounds<usize>> Index<R> for DevMemMemoryMapper
impl<R: RangeBounds<usize>> Index<R> for DevMemMemoryMapper
Source§impl MemoryMapper for DevMemMemoryMapper
impl MemoryMapper for DevMemMemoryMapper
Source§fn create(address: usize, size: usize) -> Result<Self, &'static str>
fn create(address: usize, size: usize) -> Result<Self, &'static str>
Create a Mapper that maps the given physical address and size.
Source§fn len(&self) -> usize
fn len(&self) -> usize
Returns the maximum length that can be addressed. The end of this
memory mapped range is
address + len().Source§fn as_mut_ptr<T>(&mut self) -> *mut T
fn as_mut_ptr<T>(&mut self) -> *mut T
Returns a mutable pointer to the mapped memory region.
Source§fn as_range(&self, range: impl RangeBounds<usize>) -> &[u8] ⓘ
fn as_range(&self, range: impl RangeBounds<usize>) -> &[u8] ⓘ
Creates an inner range of bytes. The offsets are relative to the base
of the mapped memory, e.g.
as_range(0..4) will return the first 4
bytes of the mapped memory (a memory mapping to address 0x12340000 will
map 0x12340000..0x12340004).Source§fn as_mut_range(&mut self, range: impl RangeBounds<usize>) -> &mut [u8] ⓘ
fn as_mut_range(&mut self, range: impl RangeBounds<usize>) -> &mut [u8] ⓘ
Creates an inner mutable range of bytes.
Auto Trait Implementations§
impl Freeze for DevMemMemoryMapper
impl RefUnwindSafe for DevMemMemoryMapper
impl Send for DevMemMemoryMapper
impl Sync for DevMemMemoryMapper
impl Unpin for DevMemMemoryMapper
impl UnwindSafe for DevMemMemoryMapper
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