Struct rusb::DeviceDescriptor[][src]

pub struct DeviceDescriptor { /* fields omitted */ }
Expand description

Describes a device.

Implementations

impl DeviceDescriptor[src]

pub fn usb_version(&self) -> Version[src]

Returns the device’s maximum supported USB version.

pub fn device_version(&self) -> Version[src]

Returns the manufacturer’s version of the device.

pub fn manufacturer_string_index(&self) -> Option<u8>[src]

Returns the index of the string descriptor that contains the manufacturer name.

pub fn product_string_index(&self) -> Option<u8>[src]

Returns the index of the string descriptor that contains the product name.

pub fn serial_number_string_index(&self) -> Option<u8>[src]

Returns the index of the string descriptor that contains the device’s serial number.

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

Returns the device’s class code.

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

Returns the device’s sub class code.

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

Returns the device’s protocol code.

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

Returns the device’s vendor ID.

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

Returns the device’s product ID.

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

Returns the maximum packet size of the device’s first endpoint.

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

Returns the number of config descriptors available for the device.

Trait Implementations

impl Debug for DeviceDescriptor[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.