Trait DeviceDriver

Source
pub trait DeviceDriver {
    // Required methods
    fn name(&self) -> &'static str;
    fn match_table(&self) -> Vec<&'static str>;
    fn probe(&self, device: &dyn DeviceInfo) -> Result<(), &'static str>;
    fn remove(&self, device: &dyn DeviceInfo) -> Result<(), &'static str>;
}
Expand description

Device driver trait.

This trait defines the interface for device drivers in the kernel. It includes methods for getting the driver’s name, matching the driver to devices, and handling device probing and removal.

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn match_table(&self) -> Vec<&'static str>

Source

fn probe(&self, device: &dyn DeviceInfo) -> Result<(), &'static str>

Source

fn remove(&self, device: &dyn DeviceInfo) -> Result<(), &'static str>

Implementors§