pub struct RegionMemoryMapper<'a> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<'a> MemoryMapper for RegionMemoryMapper<'a>
impl<'a> MemoryMapper for RegionMemoryMapper<'a>
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<'a> Freeze for RegionMemoryMapper<'a>
impl<'a> RefUnwindSafe for RegionMemoryMapper<'a>
impl<'a> Send for RegionMemoryMapper<'a>
impl<'a> Sync for RegionMemoryMapper<'a>
impl<'a> Unpin for RegionMemoryMapper<'a>
impl<'a> !UnwindSafe for RegionMemoryMapper<'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