pub enum PullState {
Queued,
Running,
Paused,
Done,
Failed,
Cancelled,
Interrupted,
}Expand description
Where a pull is in its life.
Paused and Interrupted both mean “stopped with bytes worth keeping”; they
differ in who stopped it, which is what the user needs to know. Interrupted
is never written by the process that died: it is what a reader concludes from
a record whose worker no longer holds the lock.
Variants§
Queued
Waiting for a free slot.
Running
Transferring.
Paused
Stopped by the user, resumable.
Done
Installed.
Failed
Ended on something retrying will not fix.
Cancelled
Stopped by the user for good.
Interrupted
Stopped by something other than the user, resumable.
Implementations§
Source§impl PullState
impl PullState
Sourcepub fn is_terminal(self) -> bool
pub fn is_terminal(self) -> bool
Whether the job has ended for good (Done/Failed/Cancelled).
Sourcepub fn is_resumable(self) -> bool
pub fn is_resumable(self) -> bool
Whether a worker could pick the job up again.
Trait Implementations§
impl Copy for PullState
Source§impl<'de> Deserialize<'de> for PullState
impl<'de> Deserialize<'de> for PullState
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
impl Eq for PullState
impl StructuralPartialEq for PullState
Auto Trait Implementations§
impl Freeze for PullState
impl RefUnwindSafe for PullState
impl Send for PullState
impl Sync for PullState
impl Unpin for PullState
impl UnsafeUnpin for PullState
impl UnwindSafe for PullState
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