Struct hidapi::HidDeviceInfo [−][src]
pub struct HidDeviceInfo {
pub path: CString,
pub vendor_id: u16,
pub product_id: u16,
pub serial_number: Option<String>,
pub release_number: u16,
pub manufacturer_string: Option<String>,
pub product_string: Option<String>,
pub usage_page: u16,
pub usage: u16,
pub interface_number: i32,
}Storage for device related information
Fields
path: CString
vendor_id: u16
product_id: u16
serial_number: Option<String>
release_number: u16
manufacturer_string: Option<String>
product_string: Option<String>
usage_page: u16
usage: u16
interface_number: i32
Methods
impl HidDeviceInfo[src]
impl HidDeviceInfopub fn open_device(&self, hidapi: &HidApi) -> HidResult<HidDevice>[src]
pub fn open_device(&self, hidapi: &HidApi) -> HidResult<HidDevice>Use the information contained in HidDeviceInfo 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
impl Debug for HidDeviceInfo[src]
impl Debug for HidDeviceInfofn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for HidDeviceInfo[src]
impl Clone for HidDeviceInfofn clone(&self) -> HidDeviceInfo[src]
fn clone(&self) -> HidDeviceInfoReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
Auto Trait Implementations
impl Send for HidDeviceInfo
impl Send for HidDeviceInfoimpl Sync for HidDeviceInfo
impl Sync for HidDeviceInfo