pub enum UsbHotplugEvent {
Arrived,
Left,
}Expand description
A USB hotplug trigger emitted when any block device connects or disconnects.
This is intentionally a plain enum with no device payload. All drive metadata is obtained by re-running the sysfs / diskutil / wmic enumeration after receiving the event.
Variants§
Arrived
A drive was connected (a new entry appeared under the watched path).
Left
A drive was disconnected (an entry was removed from the watched path).
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 · 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 UsbHotplugEvent
impl Debug for UsbHotplugEvent
Source§impl PartialEq for UsbHotplugEvent
impl PartialEq for UsbHotplugEvent
impl Eq for UsbHotplugEvent
impl StructuralPartialEq for UsbHotplugEvent
Auto Trait Implementations§
impl Freeze for UsbHotplugEvent
impl RefUnwindSafe for UsbHotplugEvent
impl Send for UsbHotplugEvent
impl Sync for UsbHotplugEvent
impl Unpin for UsbHotplugEvent
impl UnsafeUnpin for UsbHotplugEvent
impl UnwindSafe for UsbHotplugEvent
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