pub struct DeviceDescriptor { /* private fields */ }Expand description
A USB device descriptor.
There is one device descriptor provided by a D3XX device. This descriptor holds very basic information about the device, such as its identification, USB version, and function.
Implementations§
Source§impl DeviceDescriptor
impl DeviceDescriptor
Sourcepub fn serial_number(&self) -> &str
pub fn serial_number(&self) -> &str
The device serial number.
Sourcepub fn manufacturer(&self) -> &str
pub fn manufacturer(&self) -> &str
Human-readable manufacturer name.
Sourcepub fn product_id(&self) -> usize
pub fn product_id(&self) -> usize
The product ID.
Sourcepub fn usb_version(&self) -> UsbVersion
pub fn usb_version(&self) -> UsbVersion
The USB protocol version (e.g. USB 2.0)
Sourcepub fn max_packet_size(&self) -> usize
pub fn max_packet_size(&self) -> usize
The maximum size, in bytes, of a packet for an endpoint.
This is typically irrelevant for the user.
Sourcepub fn class_codes(&self) -> ClassCodes
pub fn class_codes(&self) -> ClassCodes
Returns a struct containing the interface class codes.
The codes are used to indicate the class, subclass, and protocol.
Auto Trait Implementations§
impl Freeze for DeviceDescriptor
impl RefUnwindSafe for DeviceDescriptor
impl Send for DeviceDescriptor
impl Sync for DeviceDescriptor
impl Unpin 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