pub struct DeviceInfo {
pub id: DeviceId,
pub name: String,
pub product_id: u16,
pub vendor_id: u16,
pub usage_id: u16,
pub usage_page: u16,
pub serial_number: Option<String>,
}
Expand description
A struct containing basic information about a device
This struct is part of Device.
Fields§
§id: DeviceId
OS specific identifier
name: String
The human-readable name
product_id: u16
The HID product id assigned to this device
vendor_id: u16
The HID vendor id of the device’s manufacturer (i.e Logitech = 0x46D)
usage_id: u16
The HID usage id
usage_page: u16
The HID usage page
serial_number: Option<String>
The serial number of the device. Might be None
if the device does not have a serial number or the platform/backend does not support retrieving the serial number.
Implementations§
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceInfo
impl Debug for DeviceInfo
Source§impl Hash for DeviceInfo
impl Hash for DeviceInfo
Source§impl PartialEq for DeviceInfo
impl PartialEq for DeviceInfo
impl Eq for DeviceInfo
impl StructuralPartialEq for DeviceInfo
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnwindSafe for DeviceInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more