pub struct Meta {
pub id: String,
pub name: String,
pub queue: String,
pub attempt: u32,
pub max_attempts: u32,
pub deadline: Option<Instant>,
}Expand description
Metadata about the currently executing job, available as a handler argument.
Extract Meta in a handler function to inspect the job’s identity and
retry state at runtime.
Fields§
§id: StringUnique job ID (ULID format).
name: StringRegistered handler name used to identify the job type.
queue: StringName of the queue this job belongs to.
attempt: u32Current attempt number (1-based; incremented on each execution).
max_attempts: u32Maximum number of attempts before the job is marked Dead.
deadline: Option<Instant>Absolute deadline for this execution; None if no timeout is set.
Trait Implementations§
Source§impl FromJobContext for Meta
impl FromJobContext for Meta
Source§fn from_job_context(ctx: &JobContext) -> Result<Self>
fn from_job_context(ctx: &JobContext) -> Result<Self>
Extract
Self from the job context, returning an error if extraction
fails. Read moreAuto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnsafeUnpin for Meta
impl UnwindSafe for Meta
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