Trait devices::virtio::virtio_device::SharedMemoryMapper   
source · pub trait SharedMemoryMapper: Send {
    // Required methods
    fn add_mapping(
        &mut self,
        source: VmMemorySource,
        offset: u64,
        prot: Protection,
        cache: MemCacheType,
    ) -> Result<()>;
    fn remove_mapping(&mut self, offset: u64) -> Result<()>;
    // Provided method
    fn as_raw_descriptor(&self) -> Option<RawDescriptor> { ... }
}Expand description
Trait for mapping memory into the device’s shared memory region.
Required Methods§
sourcefn add_mapping(
    &mut self,
    source: VmMemorySource,
    offset: u64,
    prot: Protection,
    cache: MemCacheType,
) -> Result<()>
 
fn add_mapping( &mut self, source: VmMemorySource, offset: u64, prot: Protection, cache: MemCacheType, ) -> Result<()>
Maps the given |source| into the shared memory region at |offset|.
sourcefn remove_mapping(&mut self, offset: u64) -> Result<()>
 
fn remove_mapping(&mut self, offset: u64) -> Result<()>
Removes the mapping beginning at |offset|.