pub trait Adapter {
type IdInfo: 'static;
// Required method
fn of_id_table() -> Option<IdTable<Self::IdInfo>>;
// Provided methods
fn of_id_info(_dev: &Device) -> Option<&'static Self::IdInfo> { ... }
fn id_info(dev: &Device) -> Option<&'static Self::IdInfo> { ... }
}
Expand description
The bus independent adapter to match a drivers and a devices.
This trait should be implemented by the bus specific adapter, which represents the connection of a device and a driver.
It provides bus independent functions for device / driver interactions.
Required Associated Types§
Required Methods§
Sourcefn of_id_table() -> Option<IdTable<Self::IdInfo>>
fn of_id_table() -> Option<IdTable<Self::IdInfo>>
The of::IdTable
of the corresponding driver.
Provided Methods§
fn of_id_info(_dev: &Device) -> Option<&'static Self::IdInfo>
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.