pub enum DeviceEvent {
ObjectAdded {
handle: ObjectHandle,
},
ObjectRemoved {
handle: ObjectHandle,
},
StoreAdded {
storage_id: StorageId,
},
StoreRemoved {
storage_id: StorageId,
},
StorageInfoChanged {
storage_id: StorageId,
},
ObjectInfoChanged {
handle: ObjectHandle,
},
DeviceInfoChanged,
DeviceReset,
Unknown {
code: u16,
params: [u32; 3],
},
}Expand description
Events from an MTP device.
Variants§
ObjectAdded
A new object was added.
Fields
§
handle: ObjectHandleHandle of the new object.
ObjectRemoved
An object was removed.
Fields
§
handle: ObjectHandleHandle of the removed object.
StoreAdded
A storage was added (e.g., SD card inserted).
StoreRemoved
A storage was removed.
StorageInfoChanged
Storage info changed (e.g., free space).
ObjectInfoChanged
Object info changed.
Fields
§
handle: ObjectHandleHandle of the object that changed.
DeviceInfoChanged
Device info changed.
DeviceReset
Device is being reset.
Unknown
Unknown event.
Implementations§
Source§impl DeviceEvent
impl DeviceEvent
Sourcepub fn from_container(container: &EventContainer) -> Self
pub fn from_container(container: &EventContainer) -> Self
Parse from an event container.
Trait Implementations§
Source§impl Clone for DeviceEvent
impl Clone for DeviceEvent
Source§fn clone(&self) -> DeviceEvent
fn clone(&self) -> DeviceEvent
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 moreAuto Trait Implementations§
impl Freeze for DeviceEvent
impl RefUnwindSafe for DeviceEvent
impl Send for DeviceEvent
impl Sync for DeviceEvent
impl Unpin for DeviceEvent
impl UnsafeUnpin for DeviceEvent
impl UnwindSafe for DeviceEvent
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