Struct brokkr::Job[][src]

pub struct Job<T, R> {
    pub id: Uuid,
    pub task: T,
    pub result: Option<R>,
    pub failure_info: Option<String>,
    pub created_at: NaiveDateTime,
    pub started_at: Option<NaiveDateTime>,
    pub processed_at: Option<NaiveDateTime>,
    pub state: JobState,
}

A job and its metadata / state information.

Fields

The unique id of this job.

The actual application level task to be processed.

Result of processing the task.

Failure information, that's the panic payload in case of panic or the. reported error in case of handled error.

Time when the job was created / queued.

Time when processing started for this job.

Time when processing finished for this job.

State of this job.

Methods

impl<T: Encodable, R: Encodable> Job<T, R>
[src]

Create a job given a task object.

Trait Implementations

impl<T: Debug, R: Debug> Debug for Job<T, R>
[src]

Formats the value using the given formatter. Read more

impl<T: Clone, R: Clone> Clone for Job<T, R>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug, R: Debug> Display for Job<T, R>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T, R> Send for Job<T, R> where
    R: Send,
    T: Send

impl<T, R> Sync for Job<T, R> where
    R: Sync,
    T: Sync