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§

source

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|.

source

fn remove_mapping(&mut self, offset: u64) -> Result<()>

Removes the mapping beginning at |offset|.

Provided Methods§

Implementors§