Struct usb_ids::Device [−][src]
Represents a single device in the USB database.
Every device has a corresponding vendor, a device ID, a pretty name,
and a list of associated Interfaces.
Implementations
impl Device[src]
pub fn from_vid_pid(vid: u16, pid: u16) -> Option<&'static Device>[src]
Returns the Device corresponding to the given vendor and product IDs,
or None if no such device exists in the DB.
pub fn vendor(&self) -> &'static Vendor[src]
Returns the Vendor that this device belongs to.
Looking up a vendor by device is cheap (O(1)).
pub fn as_vid_pid(&self) -> (u16, u16)[src]
Returns a tuple of (vendor id, device/"product" id) for this device.
This is convenient for interactions with other USB libraries.
pub fn id(&self) -> u16[src]
Returns the device's ID.
pub fn name(&self) -> &'static str[src]
Returns the device's name.
pub fn interfaces(&self) -> impl Iterator<Item = &'static Interface>[src]
Returns an iterator over the device's interfaces.
NOTE: The USB database does not include interface information for most devices. This list is not authoritative.
Trait Implementations
impl Clone for Device[src]
impl Copy for Device[src]
impl Debug for Device[src]
impl PartialEq<Device> for Device[src]
impl StructuralPartialEq for Device[src]
Auto Trait Implementations
impl RefUnwindSafe for Device[src]
impl Send for Device[src]
impl Sync for Device[src]
impl Unpin for Device[src]
impl UnwindSafe for Device[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,