pub struct MemoryRegionRegistry { /* private fields */ }Expand description
Global registry for exported memory-region capabilities.
Implementations§
Source§impl MemoryRegionRegistry
impl MemoryRegionRegistry
Sourcepub fn export_region(
&self,
address_space: &AddressSpace,
start: u64,
handle_cap: CapId,
) -> Result<u64, RegionCapError>
pub fn export_region( &self, address_space: &AddressSpace, start: u64, handle_cap: CapId, ) -> Result<u64, RegionCapError>
Exports the tracked region starting at start into a public capability resource.
Sourcepub fn retain_handle(
&self,
resource_id: u64,
handle_cap: CapId,
) -> Result<(), RegionCapError>
pub fn retain_handle( &self, resource_id: u64, handle_cap: CapId, ) -> Result<(), RegionCapError>
Adds one handle reference to an exported memory region.
Sourcepub fn info(&self, resource_id: u64) -> Option<PublicMemoryRegionInfo>
pub fn info(&self, resource_id: u64) -> Option<PublicMemoryRegionInfo>
Returns public metadata about an exported memory region.
Sourcepub fn map_region(
&self,
resource_id: u64,
address_space: &AddressSpace,
addr_hint: u64,
requested_flags: VmaFlags,
) -> Result<(u64, u64), RegionCapError>
pub fn map_region( &self, resource_id: u64, address_space: &AddressSpace, addr_hint: u64, requested_flags: VmaFlags, ) -> Result<(u64, u64), RegionCapError>
Maps an exported memory region into address_space.
Sourcepub fn release_handle(
&self,
resource_id: u64,
handle_cap: CapId,
) -> Result<ReleaseRegionResult, RegionCapError>
pub fn release_handle( &self, resource_id: u64, handle_cap: CapId, ) -> Result<ReleaseRegionResult, RegionCapError>
Releases one handle reference to an exported memory region.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MemoryRegionRegistry
impl !RefUnwindSafe for MemoryRegionRegistry
impl Send for MemoryRegionRegistry
impl Sync for MemoryRegionRegistry
impl Unpin for MemoryRegionRegistry
impl UnsafeUnpin for MemoryRegionRegistry
impl UnwindSafe for MemoryRegionRegistry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more