pub enum JobStatus {
Running,
Completed {
exit_code: i32,
delivery: Delivery,
},
Failed {
error: String,
delivery: Delivery,
},
Killed {
cause: KillCause,
delivery: Delivery,
},
}Expand description
Status of a background job.
Every finished status carries its Delivery: the transition that
finishes a job also records that its completion is owed to the agent.
The registry forgets a job once its completion was taken and nothing
watches it, so a Delivery::Taken job reads only while it is watched
or, taken by a waiter, until its own flow settles it.
Variants§
Running
Job is currently running.
Completed
Job completed successfully.
Fields
Failed
Job failed with an error.
Fields
Killed
Job was killed.
Implementations§
Source§impl JobStatus
impl JobStatus
Sourcepub const fn delivery(&self) -> Option<Delivery>
pub const fn delivery(&self) -> Option<Delivery>
How far a finished job’s completion got; None while it runs.
Sourcepub const fn kill_cause(&self) -> Option<KillCause>
pub const fn kill_cause(&self) -> Option<KillCause>
Why a killed job was killed; None for a job that was not.
Sourcepub const fn completion_pending(&self) -> bool
pub const fn completion_pending(&self) -> bool
Whether the job finished and its agent has yet to take the completion: the agent still owes its session a turn for it.
Trait Implementations§
impl Eq for JobStatus
impl StructuralPartialEq for JobStatus
Auto Trait Implementations§
impl Forget for JobStatus
impl Freeze for JobStatus
impl Move for JobStatus
impl RefUnwindSafe for JobStatus
impl Send for JobStatus
impl Sync for JobStatus
impl Unpin for JobStatus
impl UnsafeUnpin for JobStatus
impl UnwindSafe for JobStatus
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more