Trait guestmem::MapRom

source ·
pub trait MapRom: Send + Sync {
    // Required methods
    fn map_rom(
        &self,
        gpa: u64,
        offset: u64,
        len: u64,
    ) -> Result<Box<dyn UnmapRom>>;
    fn len(&self) -> u64;
}
Expand description

Trait to map a ROM at one or more locations in guest memory.

Required Methods§

source

fn map_rom(&self, gpa: u64, offset: u64, len: u64) -> Result<Box<dyn UnmapRom>>

Maps the specified portion of the ROM into guest memory at gpa.

The returned object will implicitly unmap the ROM when dropped.

source

fn len(&self) -> u64

Returns the length of the ROM in bytes.

Implementors§