Trait guestmem::MemoryMapper

source ·
pub trait MemoryMapper: Send + Sync {
    // Required method
    fn new_region(
        &self,
        len: usize,
        debug_name: String,
    ) -> Result<(Box<dyn MappableGuestMemory>, Arc<dyn MappedMemoryRegion>)>;
}
Expand description

Trait implemented to allow the creation of memory regions.

Required Methods§

source

fn new_region( &self, len: usize, debug_name: String, ) -> Result<(Box<dyn MappableGuestMemory>, Arc<dyn MappedMemoryRegion>)>

Creates a new memory region that can later be mapped into the guest.

Returns both an interface for mapping/unmapping the region and for adding internal mappings.

Implementors§