pub trait Device:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn fd(&self) -> &File;
// Provided methods
fn get_info(&self) -> Result<VfioDeviceInfo> { ... }
fn get_region_info(&self, index: u32) -> Result<VfioRegionInfo> { ... }
fn get_irq_info(&self, index: u32) -> Result<VfioIrqInfo> { ... }
fn set_irqs<const N: usize>(&self, irq: &VfioIrqSet<N>) -> Result<()> { ... }
fn disable_all_irqs(&self, index: VfioPciIrq) -> Result<()> { ... }
fn reset(&self) -> Result<()> { ... }
fn read(&self, offset: u64, size: u8) -> Result<u64> { ... }
fn write(&self, offset: u64, size: u8, val: u64) -> Result<()> { ... }
}Required Methods§
Provided Methods§
fn get_info(&self) -> Result<VfioDeviceInfo>
fn get_region_info(&self, index: u32) -> Result<VfioRegionInfo>
fn get_irq_info(&self, index: u32) -> Result<VfioIrqInfo>
fn set_irqs<const N: usize>(&self, irq: &VfioIrqSet<N>) -> Result<()>
fn disable_all_irqs(&self, index: VfioPciIrq) -> Result<()>
fn reset(&self) -> Result<()>
fn read(&self, offset: u64, size: u8) -> Result<u64>
fn write(&self, offset: u64, size: u8, val: u64) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.