pub fn load_compatible_driver(&mut self, device: NeutronDevice) {
        let __d = match self
            .registered_drivers
            .iter()
            .find(|d| d.driver_id() == device.device_driver_id())
        {
            Some(driver) => {
                // 100% compatible driver exists for device, load if not loaded already
                driver
            }
            None => {
                // cant find a fully supported driver, test manually
                let mut res = self
                    .registered_drivers
                    .iter()
                    .filter(|d| d.device_type() == device.dev_type());

                let _driver = res.find(|r| test_driver_on_device(r, &device));

                match _driver {
                    Some(d) => d,
                    None => return,
                }
            }
        };

        // ! CANNOT DO THIS, FIND ANOTHER WAY!
        // self.load_driver(__d.to_owned());
    }
// check device tree for drivers that can be loaded for them
// the device type must match. And if the id also matches, use that one
// if no driver_id and dev_ids match, then load all possible drivers of that type and test them on the device. If device does not respond in an expected way, dont load them (Neutron Principle: Be very specific)
check device tree for drivers that can be loaded for them
the device type must match. And if the id also matches, use that one
if no driver_id and dev_ids match, then load all possible drivers of that type and test them on the device. If device does not respond in an expected way, dont load them (Neutron Principle: Be very specific)
check device tree for drivers that can be loaded for them the device type must match . And if the id also matches use that one if no driver_id and dev_ids match then load all possible drivers of that type and test them on the device . If device does not respond in an expected way dont load them ( Neutron Principle : Be very specific )
pub fn load_compatible_driver(&mut self, device: NeutronDevice) {
        let __d = match self
            .registered_drivers
            .iter()
            .find(|d| d.driver_id() == device.device_driver_id())
        {
            Some(driver) => {
                // 100% compatible driver exists for device, load if not loaded already
                driver
            }
            None => {
                // cant find a fully supported driver, test manually
                let mut res = self
                    .registered_drivers
                    .iter()
                    .filter(|d| d.device_type() == device.dev_type());
                let _driver = res.find(|r| test_driver_on_device(r, &device));
                match _driver {
                    Some(d) => d,
                    None => return,
                }
            }
        };
        // ! CANNOT DO THIS, FIND ANOTHER WAY!
        // self.load_driver(__d.to_owned());
    }
pub fn load_compatible_driver ( & mut self , device : NeutronDevice ) { let __d = match self . registered_drivers . iter ( ) . find ( | d | d . driver_id ( ) == device . device_driver_id ( ) ) { Some ( driver ) => { // 100% compatible driver exists for device, load if not loaded already driver } None => { // cant find a fully supported driver, test manually let mut res = self . registered_drivers . iter ( ) . filter ( | d | d . device_type ( ) == device . dev_type ( ) ) ; let _driver = res . find ( | r | test_driver_on_device ( r , & device ) ) ; match _driver { Some ( d ) => d , None => return , } } } ; // ! CANNOT DO THIS, FIND ANOTHER WAY! // self.load_driver(__d.to_owned()); }
check device tree for drivers that can be loaded for them
the device type must match.
check device tree for drivers that can be loaded for them the device type must match .
&mut self
device
NeutronDevice
&mut self
device
NeutronDevice