pub enum TerminationReason {
Completed,
Cancelled,
Incomplete,
Failed,
}Expand description
How a download run ended, carried by Event::Terminated.
Variants§
Completed
Every byte was written and the .part file was renamed into place.
Event::Renamed carries the path it landed on.
Cancelled
The CancellationToken was
triggered. The .part and .fd files are left on disk so a later
resume can pick up where this run stopped.
Incomplete
The run stopped on its own without completing the file — every worker
gave up, for example because the connection kept failing. Like
TerminationReason::Cancelled, the .part and .fd files are left
on disk.
Failed
A fatal error ended the run: metadata could not be fetched, the output file could not be opened, the rename failed, and so on.
Trait Implementations§
Source§impl Clone for TerminationReason
impl Clone for TerminationReason
impl Copy for TerminationReason
Source§impl Debug for TerminationReason
impl Debug for TerminationReason
impl Eq for TerminationReason
Source§impl PartialEq for TerminationReason
impl PartialEq for TerminationReason
impl StructuralPartialEq for TerminationReason
Auto Trait Implementations§
impl Freeze for TerminationReason
impl RefUnwindSafe for TerminationReason
impl Send for TerminationReason
impl Sync for TerminationReason
impl Unpin for TerminationReason
impl UnsafeUnpin for TerminationReason
impl UnwindSafe for TerminationReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.