pub enum UsbHotplugEvent {
DeviceAttached {
port: u8,
speed: UsbDeviceSpeed,
vendor_id: u16,
product_id: u16,
device_class: u8,
},
DeviceDetached {
port: u8,
},
}Expand description
USB hotplug event
Variants§
DeviceAttached
A USB device was physically attached to a port
Fields
§
port: u8Port number (0-based)
§
speed: UsbDeviceSpeedConnection speed
§
vendor_id: u16USB vendor ID (from device descriptor, 0 if not yet read)
§
product_id: u16USB product ID (from device descriptor, 0 if not yet read)
§
device_class: u8USB device class code (from device descriptor)
DeviceDetached
A USB device was physically detached from a port
Fields
§
port: u8Port number (0-based)
Trait Implementations§
Source§impl Clone for UsbHotplugEvent
impl Clone for UsbHotplugEvent
Source§fn clone(&self) -> UsbHotplugEvent
fn clone(&self) -> UsbHotplugEvent
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UsbHotplugEvent
impl RefUnwindSafe for UsbHotplugEvent
impl Send for UsbHotplugEvent
impl Sync for UsbHotplugEvent
impl Unpin for UsbHotplugEvent
impl UnwindSafe for UsbHotplugEvent
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)