Trait devices::bus::BusDeviceObj

source ·
pub trait BusDeviceObj {
    // Provided methods
    fn as_pci_device(&self) -> Option<&dyn PciDevice> { ... }
    fn as_pci_device_mut(&mut self) -> Option<&mut dyn PciDevice> { ... }
    fn into_pci_device(self: Box<Self>) -> Option<Box<dyn PciDevice>> { ... }
    fn as_platform_device(&self) -> Option<&VfioPlatformDevice> { ... }
    fn as_platform_device_mut(&mut self) -> Option<&mut VfioPlatformDevice> { ... }
    fn into_platform_device(self: Box<Self>) -> Option<Box<VfioPlatformDevice>> { ... }
    fn as_virtio_mmio_device(&self) -> Option<&VirtioMmioDevice> { ... }
    fn as_virtio_mmio_device_mut(&mut self) -> Option<&mut VirtioMmioDevice> { ... }
    fn into_virtio_mmio_device(self: Box<Self>) -> Option<Box<VirtioMmioDevice>> { ... }
}
Expand description

Trait for generic device abstraction, that is, all devices that reside on BusDevice and want to be converted back to its original type. Each new foo device must provide as_foo_device() + as_foo_device_mut() + into_foo_device(), default impl methods return None.

Provided Methods§

Implementors§