pub struct UsbDeviceInfo {
pub sysfs_name: String,
pub vid: Option<String>,
pub pid: Option<String>,
pub serial: Option<String>,
pub product: Option<String>,
pub manufacturer: Option<String>,
pub busnum: Option<String>,
pub devnum: Option<String>,
pub devpath: Option<String>,
pub device_class: Option<String>,
pub speed: Option<String>,
}Expand description
One USB device on the box’s bus, read from sysfs by GET /usb/devices.
String fields are None when the device does not expose the descriptor
(e.g. serial on devices with no iSerial).
Fields§
§sysfs_name: Stringsysfs entry name, e.g. "1-1.4".
vid: Option<String>Vendor id, lowercase hex (e.g. "0483").
pid: Option<String>Product id, lowercase hex (e.g. "df11").
serial: Option<String>iSerial descriptor.
product: Option<String>Product descriptor string.
manufacturer: Option<String>Manufacturer descriptor string.
busnum: Option<String>Bus number.
devnum: Option<String>Device number on the bus (changes on re-enumeration).
devpath: Option<String>Hub port path, e.g. "1.4".
device_class: Option<String>bDeviceClass, hex.
speed: Option<String>Negotiated speed in Mbps ("1.5", "12", "480", …).
Trait Implementations§
Source§impl Clone for UsbDeviceInfo
impl Clone for UsbDeviceInfo
Source§fn clone(&self) -> UsbDeviceInfo
fn clone(&self) -> UsbDeviceInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UsbDeviceInfo
impl Debug for UsbDeviceInfo
Source§impl<'de> Deserialize<'de> for UsbDeviceInfo
impl<'de> Deserialize<'de> for UsbDeviceInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UsbDeviceInfo
impl RefUnwindSafe for UsbDeviceInfo
impl Send for UsbDeviceInfo
impl Sync for UsbDeviceInfo
impl Unpin for UsbDeviceInfo
impl UnsafeUnpin for UsbDeviceInfo
impl UnwindSafe for UsbDeviceInfo
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