pub struct InputId(/* private fields */);Expand description
Input device ID.
uinput devices, devices exported by ALSA, and other devices often leave this structure empty
(all-zeroes).
Implementations§
Source§impl InputId
impl InputId
Sourcepub const fn new(bus: Bus, vendor: u16, product: u16, version: u16) -> Self
pub const fn new(bus: Bus, vendor: u16, product: u16, version: u16) -> Self
Creates an InputId from its components.
Sourcepub fn bus(&self) -> Bus
pub fn bus(&self) -> Bus
Returns the bus type this device is attached to the system with.
This is often left as 0 for virtual devices.
Sourcepub fn vendor(&self) -> u16
pub fn vendor(&self) -> u16
Returns the vendor ID.
For USB and PCI devices, the vendor ID is typically taken from the device descriptor and may be looked up in the corresponding registry.
Trait Implementations§
impl Copy for InputId
impl Eq for InputId
impl StructuralPartialEq for InputId
Auto Trait Implementations§
impl Freeze for InputId
impl RefUnwindSafe for InputId
impl Send for InputId
impl Sync for InputId
impl Unpin for InputId
impl UnwindSafe for InputId
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