pub enum DeviceSelector {
First,
SerialNumber(String),
BusAddress {
bus_id: String,
device_address: u8,
},
}Expand description
Which KM003C to open when several are attached.
A USB reset re-enumerates the device, so the selector is also what makes the post-reset reopen land on the same unit rather than on whichever KM003C the OS happens to list first.
Variants§
First
Open the first KM003C the OS reports.
SerialNumber(String)
Open the KM003C with this USB serial number string.
BusAddress
Open the KM003C at this bus and device address.
The address changes across a USB reset, so prefer
DeviceSelector::SerialNumber together with skip_reset().
Trait Implementations§
Source§impl Clone for DeviceSelector
impl Clone for DeviceSelector
Source§impl Debug for DeviceSelector
impl Debug for DeviceSelector
Source§impl Default for DeviceSelector
impl Default for DeviceSelector
impl Eq for DeviceSelector
Source§impl PartialEq for DeviceSelector
impl PartialEq for DeviceSelector
impl StructuralPartialEq for DeviceSelector
Auto Trait Implementations§
impl Freeze for DeviceSelector
impl RefUnwindSafe for DeviceSelector
impl Send for DeviceSelector
impl Sync for DeviceSelector
impl Unpin for DeviceSelector
impl UnsafeUnpin for DeviceSelector
impl UnwindSafe for DeviceSelector
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