pub trait BlockDriverInit: Sized {
type Error: Debug;
type Config;
// Required methods
fn supported_vendors() -> &'static [u16];
fn supported_devices() -> &'static [u16];
unsafe fn create(
mmio_base: u64,
config: Self::Config,
) -> Result<Self, Self::Error>;
// Provided method
fn supports_device(vendor: u16, device: u16) -> bool { ... }
}Expand description
Block driver initialization trait.
Required Associated Types§
Required Methods§
Sourcefn supported_vendors() -> &'static [u16]
fn supported_vendors() -> &'static [u16]
PCI vendor IDs this driver supports.
Sourcefn supported_devices() -> &'static [u16]
fn supported_devices() -> &'static [u16]
PCI device IDs this driver supports.
Provided Methods§
Sourcefn supports_device(vendor: u16, device: u16) -> bool
fn supports_device(vendor: u16, device: u16) -> bool
Check if driver supports a PCI device.
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.