pub fn serial(&self) -> Result<String> {
        let device_handle = self.usb_device.open()?;
        let device_desc = self.usb_device.device_descriptor()?;

        // Choose first language (the punt bootloader only supports English anyway)
        let language = device_handle.read_languages(TIMEOUT)?[0];

        Ok(device_handle.read_serial_number_string(language, &device_desc, TIMEOUT)?)
    }
/// Returns the serial number string the target reports via its USB descriptor.
Returns the serial number string the target reports via its USB descriptor.
Returns the serial number string the target reports via its USB descriptor .
pub fn serial(&self) -> Result<String> {
        let device_handle = self.usb_device.open()?;
        let device_desc = self.usb_device.device_descriptor()?;
        // Choose first language (the punt bootloader only supports English anyway)
        let language = device_handle.read_languages(TIMEOUT)?[0];
        Ok(device_handle.read_serial_number_string(language, &device_desc, TIMEOUT)?)
    }
pub fn serial ( & self ) -> Result < String > { let device_handle = self . usb_device . open ( ) ? ; let device_desc = self . usb_device . device_descriptor ( ) ? ; // Choose first language (the punt bootloader only supports English anyway) let language = device_handle . read_languages ( TIMEOUT ) ? [ 0 ] ; Ok ( device_handle . read_serial_number_string ( language , & device_desc , TIMEOUT ) ? ) }
Returns the serial number string the target reports via its USB descriptor.
Returns the serial number string the target reports via its USB descriptor .
&self
&self