Struct usb2::device::Descriptor[][src]

pub struct Descriptor {
    pub bDeviceClass: u8,
    pub bDeviceSubClass: u8,
    pub bDeviceProtocol: u8,
    pub bMaxPacketSize0: bMaxPacketSize0,
    pub idVendor: u16,
    pub idProduct: u16,
    pub bcdDevice: u16,
    pub iManufacturer: Option<NonZeroU8>,
    pub iProduct: Option<NonZeroU8>,
    pub iSerialNumber: Option<NonZeroU8>,
    pub bNumConfigurations: NonZeroU8,
}

Device descriptor

Fields

bDeviceClass: u8

Device class

bDeviceSubClass: u8

Device subclass

bDeviceProtocol: u8

Device protocol

bMaxPacketSize0: bMaxPacketSize0

Maximum packet size

idVendor: u16

Vendor ID

idProduct: u16

Product ID

bcdDevice: u16

Device release number

iManufacturer: Option<NonZeroU8>

Manufacturer string index

iProduct: Option<NonZeroU8>

Product string index

iSerialNumber: Option<NonZeroU8>

Serial number string index

bNumConfigurations: NonZeroU8

Number of configurations

Implementations

impl Descriptor[src]

pub const SIZE: u8[src]

The size of this descriptor on the wire

pub fn bytes(&self) -> [u8; 18][src]

Returns the wire representation of this device endpoint

Auto Trait Implementations

impl Send for Descriptor

impl Sync for Descriptor

impl Unpin for Descriptor

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.