fn from_device(device: &libusb::Device<'h>) -> Result<UsbHandle<'h>, Error> {
        let mut handle = UsbHandle {
            device_handle: device.open().context("unable to open device")?,
            endpoint_in: 0,
            endpoint_out: 0,
            iface_detached: false,
        };
        handle.claim(&device)?;
        Ok(handle)
    }
/// Creates a USB handle from the given device.
Creates a USB handle from the given device.
Creates a USB handle from the given device .
fn from_device(device: &libusb::Device<'h>) -> Result<UsbHandle<'h>, Error> {
        let mut handle = UsbHandle {
            device_handle: device.open().context("unable to open device")?,
            endpoint_in: 0,
            endpoint_out: 0,
            iface_detached: false,
        };
        handle.claim(&device)?;
        Ok(handle)
    }
fn from_device ( device : & libusb :: Device < ' h > ) -> Result < UsbHandle < ' h > , Error > { let mut handle = UsbHandle { device_handle : device . open ( ) . context ( " " ) ? , endpoint_in : 0 , endpoint_out : 0 , iface_detached : false , } ; handle . claim ( & device ) ? ; Ok ( handle ) }
Creates a USB handle from the given device.
Creates a USB handle from the given device .
device
&libusb::Device<'h>
device
&libusb::Device<'h>