pub trait BusRouter {
// Required methods
fn dispatch(&self, access: &BusAccess) -> Result<BusResponse, DeviceError>;
fn lookup(&self, access: &BusAccess) -> Result<Arc<dyn Device>, DeviceError>;
}Expand description
Bus dispatch interface — the runtime hot-path half of a
[DeviceRuntime].
Called on every vCPU exit that targets an emulated device (MMIO / Port / SysReg).
Required Methods§
Sourcefn dispatch(&self, access: &BusAccess) -> Result<BusResponse, DeviceError>
fn dispatch(&self, access: &BusAccess) -> Result<BusResponse, DeviceError>
Looks up the device responsible for access and forwards the access
to it, returning the result.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".