pub enum DownloadState {
Pending,
Downloading,
Verifying,
Complete,
Failed(String),
Cancelled,
}Expand description
State of a download operation.
Variants§
Pending
Download is queued but not started.
Downloading
Download is in progress.
Verifying
Download complete, verifying checksum.
Complete
Download completed successfully.
Failed(String)
Download failed with error message.
Cancelled
Download was cancelled by user.
Implementations§
Source§impl DownloadState
impl DownloadState
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if the download is complete (successfully or not).
Trait Implementations§
Source§impl Clone for DownloadState
impl Clone for DownloadState
Source§fn clone(&self) -> DownloadState
fn clone(&self) -> DownloadState
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 DownloadState
impl Debug for DownloadState
Source§impl<'de> Deserialize<'de> for DownloadState
impl<'de> Deserialize<'de> for DownloadState
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
Source§impl PartialEq for DownloadState
impl PartialEq for DownloadState
Source§impl Serialize for DownloadState
impl Serialize for DownloadState
impl Eq for DownloadState
impl StructuralPartialEq for DownloadState
Auto Trait Implementations§
impl Freeze for DownloadState
impl RefUnwindSafe for DownloadState
impl Send for DownloadState
impl Sync for DownloadState
impl Unpin for DownloadState
impl UnsafeUnpin for DownloadState
impl UnwindSafe for DownloadState
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