pub struct UsbDeviceInfo { /* private fields */ }Expand description
Generic info about a USB device.
Returned by scan_usb.
Implementations§
Source§impl UsbDeviceInfo
impl UsbDeviceInfo
Sourcepub fn vid(&self) -> u16
pub fn vid(&self) -> u16
Returns the vendor ID.
Vendor IDs are centrally registered and can be looked up for example at http://www.linux-usb.org/usb.ids.
Sourcepub fn bus_number(&self) -> u8
pub fn bus_number(&self) -> u8
Returns the bus this device is attached to.
Sourcepub fn port_number(&self) -> u8
pub fn port_number(&self) -> u8
Returns the port the device is attached to.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UsbDeviceInfo
impl RefUnwindSafe for UsbDeviceInfo
impl Send for UsbDeviceInfo
impl Sync for UsbDeviceInfo
impl Unpin for UsbDeviceInfo
impl UnwindSafe for UsbDeviceInfo
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