Struct rusb::DeviceDescriptor
source · pub struct DeviceDescriptor { /* private fields */ }
Expand description
Describes a device.
Implementations§
source§impl DeviceDescriptor
impl DeviceDescriptor
sourcepub fn usb_version(&self) -> Version
pub fn usb_version(&self) -> Version
Returns the device’s maximum supported USB version.
sourcepub fn device_version(&self) -> Version
pub fn device_version(&self) -> Version
Returns the manufacturer’s version of the device.
sourcepub fn manufacturer_string_index(&self) -> Option<u8>
pub fn manufacturer_string_index(&self) -> Option<u8>
Returns the index of the string descriptor that contains the manufacturer name.
sourcepub fn product_string_index(&self) -> Option<u8>
pub fn product_string_index(&self) -> Option<u8>
Returns the index of the string descriptor that contains the product name.
sourcepub fn serial_number_string_index(&self) -> Option<u8>
pub fn serial_number_string_index(&self) -> Option<u8>
Returns the index of the string descriptor that contains the device’s serial number.
sourcepub fn class_code(&self) -> u8
pub fn class_code(&self) -> u8
Returns the device’s class code.
sourcepub fn sub_class_code(&self) -> u8
pub fn sub_class_code(&self) -> u8
Returns the device’s sub class code.
sourcepub fn protocol_code(&self) -> u8
pub fn protocol_code(&self) -> u8
Returns the device’s protocol code.
sourcepub fn product_id(&self) -> u16
pub fn product_id(&self) -> u16
Returns the device’s product ID.
sourcepub fn max_packet_size(&self) -> u8
pub fn max_packet_size(&self) -> u8
Returns the maximum packet size of the device’s first endpoint.
sourcepub fn num_configurations(&self) -> u8
pub fn num_configurations(&self) -> u8
Returns the number of config descriptors available for the device.