pub struct JobContext {
pub id: String,
pub attempt: u32,
pub max_attempts: u32,
}Expand description
Context the platform attaches to a request when it was delivered via the long-running jobs runtime. Absent on direct HTTP invocations.
Use this when a handler needs to distinguish a fresh invocation from a worker redelivery — e.g. to skip an idempotency-sensitive side effect that the prior attempt already paid for.
Fields§
§id: String§attempt: u32§max_attempts: u32Implementations§
Trait Implementations§
Source§impl Clone for JobContext
impl Clone for JobContext
Source§fn clone(&self) -> JobContext
fn clone(&self) -> JobContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for JobContext
impl RefUnwindSafe for JobContext
impl Send for JobContext
impl Sync for JobContext
impl Unpin for JobContext
impl UnsafeUnpin for JobContext
impl UnwindSafe for JobContext
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