Struct hidapi::DeviceInfo [−][src]
pub struct DeviceInfo { /* fields omitted */ }
Expand description
Device information. Use accessors to extract information about Hid devices.
Note: Methods like serial_number()
may return None, if the conversion to a
String failed internally. You can however access the raw hid representation of the
string by calling serial_number_raw()
Implementations
Try to call serial_number_raw()
, if None is returned.
Try to call manufacturer_string_raw()
, if None is returned.
Try to call product_string_raw()
, if None is returned.
Use the information contained in DeviceInfo
to open
and return a handle to a HidDevice.
By default the device path is used to open the device. When no path is available, then vid, pid and serial number are used. If both path and serial number are not available, then this function will fail with HidError::OpenHidDeviceWithDeviceInfoError.
Note, that opening a device could still be done using HidApi::open() directly.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnwindSafe for DeviceInfo
Blanket Implementations
Mutably borrows from an owned value. Read more