#[non_exhaustive]pub struct JobInfo {
pub id: Uuid,
pub name: String,
pub state: JobState,
pub attempts: i32,
pub max_attempts: Option<i32>,
pub priority: i16,
pub timeout: Option<Duration>,
pub error: Option<String>,
pub run_at: DateTime<Utc>,
pub started_at: Option<DateTime<Utc>>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
What the queue knows of one job. Its arguments are left out.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: UuidThe job’s id.
name: StringThe handler it is for.
state: JobStateWhere it is.
attempts: i32Runs so far, including one in progress.
max_attempts: Option<i32>Its own limit on tries, or None for the queue’s.
priority: i16Its priority.
timeout: Option<Duration>Its time limit, if it was given one.
error: Option<String>The text of its last failure. For operators only: it is whatever the job’s error said.
run_at: DateTime<Utc>When it may run next, or last could.
started_at: Option<DateTime<Utc>>When its latest run started.
created_at: DateTime<Utc>When it was queued.
updated_at: DateTime<Utc>When its row last changed.
Trait Implementations§
Auto Trait Implementations§
impl Forget for JobInfo
impl Freeze for JobInfo
impl RefUnwindSafe for JobInfo
impl Send for JobInfo
impl Sync for JobInfo
impl Unpin for JobInfo
impl UnsafeUnpin for JobInfo
impl UnwindSafe for JobInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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