pub enum DownloadEvent {
Queued {
download_id: i64,
item_id: String,
},
Started {
download_id: i64,
item_id: String,
},
Progress {
download_id: i64,
item_id: String,
bytes_downloaded: i64,
total_bytes: Option<i64>,
progress: f64,
},
Completed {
download_id: i64,
item_id: String,
file_path: String,
},
Failed {
download_id: i64,
item_id: String,
error: String,
},
Paused {
download_id: i64,
item_id: String,
},
Cancelled {
download_id: i64,
item_id: String,
},
WaitingForNetwork,
}Expand description
Events emitted during download operations
Variants§
Queued
Download has been queued
Started
Download has started
Progress
Download progress update
Fields
Completed
Download completed successfully
Failed
Download failed with error
Paused
Download paused
Cancelled
Download cancelled
WaitingForNetwork
The queue is holding: WiFi-only is enabled and the current network is metered/cellular. Pending rows stay pending and resume on network change.
TRACES: UR-053 | DR-074
Trait Implementations§
Source§impl Clone for DownloadEvent
impl Clone for DownloadEvent
Source§fn clone(&self) -> DownloadEvent
fn clone(&self) -> DownloadEvent
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 DownloadEvent
impl Debug for DownloadEvent
Source§impl<'de> Deserialize<'de> for DownloadEvent
impl<'de> Deserialize<'de> for DownloadEvent
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 DownloadEvent
impl RefUnwindSafe for DownloadEvent
impl Send for DownloadEvent
impl Sync for DownloadEvent
impl Unpin for DownloadEvent
impl UnsafeUnpin for DownloadEvent
impl UnwindSafe for DownloadEvent
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