[][src]Struct jaylink::UsbDeviceInfo

pub struct UsbDeviceInfo { /* fields omitted */ }

Generic info about a USB device.

Returned by scan_usb.

Implementations

impl UsbDeviceInfo[src]

pub fn vid(&self) -> u16[src]

Returns the vendor ID.

Vendor IDs are centrally registered and can be looked up for example at http://www.linux-usb.org/usb.ids.

pub fn pid(&self) -> u16[src]

Returns the product ID.

pub fn bus_number(&self) -> u8[src]

Returns the bus this device is attached to.

pub fn address(&self) -> u8[src]

Returns the device address on the bus it's attached to.

pub fn port_number(&self) -> u8[src]

Returns the port the device is attached to.

pub fn open(self) -> Result<JayLink>[src]

Tries to open this USB device.

If successful, returns a JayLink instance.

This method is equivalent to JayLink::open_usb.

Trait Implementations

impl Debug for UsbDeviceInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.