pub trait VmoMemoryHandler {
// Required methods
fn load8(&self, op: VmoOpHelper<'_, u8>) -> u8;
fn load16(&self, op: VmoOpHelper<'_, u16>) -> u16;
fn load32(&self, op: VmoOpHelper<'_, u32>) -> u32;
fn load64(&self, op: VmoOpHelper<'_, u64>) -> u64;
fn store8(&self, op: VmoOpHelper<'_, u8>, value: u8);
fn store16(&self, op: VmoOpHelper<'_, u16>, value: u16);
fn store32(&self, op: VmoOpHelper<'_, u32>, value: u32);
fn store64(&self, op: VmoOpHelper<'_, u64>, value: u64);
}Expand description
Handles MMIO read and write operations on a VMO.
Implementors define custom behavior when MMIO loads and stores of various sizes occur.
The crate::inject module contain a number of implementations of
VmoMemoryHandler that can be used to alter the behavior of loads and
stores for rich MMIO fakes.
Required Methods§
Sourcefn load8(&self, op: VmoOpHelper<'_, u8>) -> u8
fn load8(&self, op: VmoOpHelper<'_, u8>) -> u8
Handles an 8-bit MMIO load operation.
Sourcefn load16(&self, op: VmoOpHelper<'_, u16>) -> u16
fn load16(&self, op: VmoOpHelper<'_, u16>) -> u16
Handles a 16-bit MMIO load operation.
Sourcefn load32(&self, op: VmoOpHelper<'_, u32>) -> u32
fn load32(&self, op: VmoOpHelper<'_, u32>) -> u32
Handles a 32-bit MMIO load operation.
Sourcefn load64(&self, op: VmoOpHelper<'_, u64>) -> u64
fn load64(&self, op: VmoOpHelper<'_, u64>) -> u64
Handles a 64-bit MMIO load operation.
Sourcefn store8(&self, op: VmoOpHelper<'_, u8>, value: u8)
fn store8(&self, op: VmoOpHelper<'_, u8>, value: u8)
Handles an 8-bit MMIO store operation.
Sourcefn store16(&self, op: VmoOpHelper<'_, u16>, value: u16)
fn store16(&self, op: VmoOpHelper<'_, u16>, value: u16)
Handles a 16-bit MMIO store operation.
Sourcefn store32(&self, op: VmoOpHelper<'_, u32>, value: u32)
fn store32(&self, op: VmoOpHelper<'_, u32>, value: u32)
Handles a 32-bit MMIO store operation.
Sourcefn store64(&self, op: VmoOpHelper<'_, u64>, value: u64)
fn store64(&self, op: VmoOpHelper<'_, u64>, value: u64)
Handles a 64-bit MMIO store operation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".