pub struct ReservedJob {
pub id: String,
pub job: QueuedJob,
pub attempts: u32,
}Expand description
A job a worker has taken off the queue and is responsible for.
It is not gone: until the worker deletes, releases or fails it, the job is still the queue’s business, which is what makes a crashed worker recoverable.
Fields§
§id: StringThe driver’s identifier for this job. Opaque to everything else.
job: QueuedJob§attempts: u32How many times this job has now been handed to a worker, counting this time. Always at least 1.
Implementations§
Source§impl ReservedJob
impl ReservedJob
Sourcepub fn is_last_attempt(&self) -> bool
pub fn is_last_attempt(&self) -> bool
Whether this attempt is the last one the job is allowed.
Trait Implementations§
Source§impl Clone for ReservedJob
impl Clone for ReservedJob
Source§impl Debug for ReservedJob
impl Debug for ReservedJob
Source§impl PartialEq for ReservedJob
impl PartialEq for ReservedJob
impl StructuralPartialEq for ReservedJob
Auto Trait Implementations§
impl Freeze for ReservedJob
impl RefUnwindSafe for ReservedJob
impl Send for ReservedJob
impl Sync for ReservedJob
impl Unpin for ReservedJob
impl UnsafeUnpin for ReservedJob
impl UnwindSafe for ReservedJob
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