Struct rusb::DeviceDescriptor
source · pub struct DeviceDescriptor { /* private fields */ }
Expand description
Describes a device.
Implementations§
source§impl DeviceDescriptor
impl DeviceDescriptor
sourcepub fn descriptor_type(&self) -> u8
pub fn descriptor_type(&self) -> u8
Returns the descriptor type
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.
Trait Implementations§
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