pub fn device_by_path(&self, path: &Path) -> Option<(DeviceEntity, &Device)> {
        self.components
            .devices
            .iter()
            .find(|(_, device)| device.path.as_ref() == path)
            .map(move |(id, device)| (DeviceEntity { id, ctx: self }, device))
    }
/// Find a device by its path.
Find a device by its path.
Find a device by its path .
pub fn device_by_path(&self, path: &Path) -> Option<(DeviceEntity, &Device)> {
        self.components
            .devices
            .iter()
            .find(|(_, device)| device.path.as_ref() == path)
            .map(move |(id, device)| (DeviceEntity { id, ctx: self }, device))
    }
pub fn device_by_path ( & self , path : & Path ) -> Option < ( DeviceEntity , & Device ) > { self . components . devices . iter ( ) . find ( | ( _ , device ) | device . path . as_ref ( ) == path ) . map ( move | ( id , device ) | ( DeviceEntity { id , ctx : self } , device ) ) }
Find a device by its path.
Find a device by its path .
&self
path
&Path
&self
path
&Path