pub trait HardwareScanner<T: Hardware> {
    // Required methods
    fn list_devices(&self) -> Vec<HardwareInfo>;
    fn open_device_by_index(&self, idx: usize) -> HardwareResult<T>;
    fn open_device_by_name(&self, name: &str) -> HardwareResult<T>;
}
Expand description

Trait for scanning hardware on a system which can be used to diagnose ECUs

Required Methods§

source

fn list_devices(&self) -> Vec<HardwareInfo>

Lists all scanned devices. This does not necessarily mean that the hardware can be used, just that the system known it exists.

source

fn open_device_by_index(&self, idx: usize) -> HardwareResult<T>

Tries to open a device by a specific index from the HardwareScanner::list_devices function.

source

fn open_device_by_name(&self, name: &str) -> HardwareResult<T>

Tries to open a device given the devices name

Implementors§