pub struct DeviceInfo<'a> {Show 14 fields
pub vendor_id: u16,
pub product_id: u16,
pub device_class: u8,
pub device_sub_class: u8,
pub device_protocol: u8,
pub max_packet_size_0: u8,
pub device_release: u16,
pub usb_rev: u16,
pub manufacturer: Option<&'a str>,
pub product: Option<&'a str>,
pub serial_number: Option<&'a str>,
pub self_powered: bool,
pub supports_remote_wakeup: bool,
pub max_power: u8,
}Expand description
Static device metadata. Passed to UsbDeviceBuilder via the fluent API.
Fields§
§vendor_id: u16Vendor ID (USB-IF assigned).
product_id: u16Product ID.
device_class: u8Device class code (0 = specified at interface level).
device_sub_class: u8Device subclass code.
device_protocol: u8Device protocol code.
max_packet_size_0: u8Maximum EP0 packet size — must be 8, 16, 32 or 64.
device_release: u16Device release in BCD (e.g. 0x0100 = 1.00).
usb_rev: u16USB spec compliance: 0x0200 = USB 2.0, 0x0210 = USB 2.1.
manufacturer: Option<&'a str>Manufacturer string (English).
product: Option<&'a str>Product string (English).
serial_number: Option<&'a str>Serial number string (English).
self_powered: booltrue if the device has its own power supply.
supports_remote_wakeup: booltrue if the device can signal remote wake-up.
max_power: u8Maximum power draw in 2 mA units (e.g. 50 = 100 mA).
Auto Trait Implementations§
impl<'a> Forget for DeviceInfo<'a>
impl<'a> Freeze for DeviceInfo<'a>
impl<'a> Move for DeviceInfo<'a>
impl<'a> RefUnwindSafe for DeviceInfo<'a>
impl<'a> Send for DeviceInfo<'a>
impl<'a> Sync for DeviceInfo<'a>
impl<'a> Unpin for DeviceInfo<'a>
impl<'a> UnsafeUnpin for DeviceInfo<'a>
impl<'a> UnwindSafe for DeviceInfo<'a>
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