pub fn find_by_id(id: u64) -> Result<Option<Self>> {
        let devices = Self::find(false)?;

        if let Some(devices) = devices {
            Ok(devices.into_iter().find(|x| x.id == id))
        } else {
            Ok(None)
        }
    }
/// Find a device by its id
Find a device by its id
Find a device by its id
pub fn find_by_id(id: u64) -> Result<Option<Self>> {
        let devices = Self::find(false)?;
        if let Some(devices) = devices {
            Ok(devices.into_iter().find(|x| x.id == id))
        } else {
            Ok(None)
        }
    }
pub fn find_by_id ( id : u64 ) -> Result < Option < Self > > { let devices = Self :: find ( false ) ? ; if let Some ( devices ) = devices { Ok ( devices . into_iter ( ) . find ( | x | x . id == id ) ) } else { Ok ( None ) } }
Find a device by its id
Find a device by its id
id
u64