pub struct DeviceDescriptor {
pub usb_version: u16,
pub class: u8,
pub sub_class: u8,
pub protocol: u8,
pub max_packet0: u16,
pub vendor_id: u16,
pub product_id: u16,
pub device_version: u16,
pub manufacturer: u8,
pub product: u8,
pub serial_number: u8,
pub configurations: u8,
}Expand description
The standard device descriptor (USB 2.0 §9.6.1).
Fields§
§usb_version: u16bcdUSB.
class: u8bDeviceClass.
sub_class: u8bDeviceSubClass.
protocol: u8bDeviceProtocol.
max_packet0: u16bMaxPacketSize0, the control endpoint packet size.
vendor_id: u16idVendor.
product_id: u16idProduct.
device_version: u16bcdDevice.
manufacturer: u8Manufacturer string index, zero when absent.
product: u8Product string index, zero when absent.
serial_number: u8Serial number string index, zero when absent.
configurations: u8bNumConfigurations.
Implementations§
Trait Implementations§
Source§impl Clone for DeviceDescriptor
impl Clone for DeviceDescriptor
impl Copy for DeviceDescriptor
Source§impl Debug for DeviceDescriptor
impl Debug for DeviceDescriptor
Source§impl Default for DeviceDescriptor
impl Default for DeviceDescriptor
impl Eq for DeviceDescriptor
Source§impl Format for DeviceDescriptor
impl Format for DeviceDescriptor
Source§impl PartialEq for DeviceDescriptor
impl PartialEq for DeviceDescriptor
impl StructuralPartialEq for DeviceDescriptor
Auto Trait Implementations§
impl Forget for DeviceDescriptor
impl Freeze for DeviceDescriptor
impl Move for DeviceDescriptor
impl RefUnwindSafe for DeviceDescriptor
impl Send for DeviceDescriptor
impl Sync for DeviceDescriptor
impl Unpin for DeviceDescriptor
impl UnsafeUnpin for DeviceDescriptor
impl UnwindSafe for DeviceDescriptor
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