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