pub enum TransferState {
InProgress {
bytes_transferred: usize,
total_bytes: usize,
chunk_index: usize,
},
Completed {
total_bytes: usize,
},
Interrupted {
bytes_transferred: usize,
total_bytes: usize,
resumable: bool,
},
Failed {
error: String,
},
}Expand description
State of a partial transfer session
Variants§
InProgress
Transfer is in progress
Fields
Completed
Transfer completed successfully
Interrupted
Transfer was interrupted
Fields
Failed
Transfer failed
Implementations§
Source§impl TransferState
impl TransferState
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if transfer is complete
Sourcepub fn is_resumable(&self) -> bool
pub fn is_resumable(&self) -> bool
Check if transfer can be resumed
Trait Implementations§
Source§impl Clone for TransferState
impl Clone for TransferState
Source§fn clone(&self) -> TransferState
fn clone(&self) -> TransferState
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 TransferState
impl RefUnwindSafe for TransferState
impl Send for TransferState
impl Sync for TransferState
impl Unpin for TransferState
impl UnwindSafe for TransferState
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