Enum background_jobs_core::JobResult
source · pub enum JobResult {
Success,
Failure,
Unregistered,
Unexecuted,
}
Expand description
Indicate the state of a job after an attempted run
Variants§
Success
The job succeeded
Failure
The job failed
Unregistered
The worker had no concept of this job
Unexecuted
The worker requesting this job closed
Implementations§
source§impl JobResult
impl JobResult
sourcepub const fn unregistered() -> Self
pub const fn unregistered() -> Self
Indicate that the job was not registered for this worker
sourcepub const fn is_failure(self) -> bool
pub const fn is_failure(self) -> bool
Check if the job failed
sourcepub const fn is_success(self) -> bool
pub const fn is_success(self) -> bool
Check if the job succeeded
sourcepub const fn is_unregistered(self) -> bool
pub const fn is_unregistered(self) -> bool
Check if the job is missing it’s processor
sourcepub const fn is_unexecuted(self) -> bool
pub const fn is_unexecuted(self) -> bool
Check if the job was returned without an execution attempt
Trait Implementations§
source§impl<'de> Deserialize<'de> for JobResult
impl<'de> Deserialize<'de> for JobResult
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 JobResult
impl PartialEq for JobResult
impl Copy for JobResult
impl Eq for JobResult
impl StructuralPartialEq for JobResult
Auto Trait Implementations§
impl Freeze for JobResult
impl RefUnwindSafe for JobResult
impl Send for JobResult
impl Sync for JobResult
impl Unpin for JobResult
impl UnwindSafe for JobResult
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