pub struct VmoMapping { /* private fields */ }
Expand description
An active mapping of a Vmo in the root Vmar.
The mapped memory is kept mapped while the VmoMapping object is alive.
Implementations§
Source§impl VmoMapping
impl VmoMapping
Sourcepub fn map(
offset: usize,
size: usize,
vmo: Vmo,
) -> Result<MmioRegion<VmoMemory>, Status>
pub fn map( offset: usize, size: usize, vmo: Vmo, ) -> Result<MmioRegion<VmoMemory>, Status>
Map the specified memory range of the given Vmo in the root Vmar for this process and return an object that maintains the mapping for its lifetime.
Errors:
- [Status::OUT_OF_RANGE]: if
size > isize::MAX
. - [Status::OUT_OF_RANGE]: if the requested region falls outside of the vmo’s memory.
- An error returned by [zx::Vmar::map]: if the mapping fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VmoMapping
impl RefUnwindSafe for VmoMapping
impl Send for VmoMapping
impl Sync for VmoMapping
impl Unpin for VmoMapping
impl UnwindSafe for VmoMapping
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