Trait Job
Source pub trait Job:
Send
+ Sync
+ RefUnwindSafe
+ Serialize
+ Deserialize {
// Required method
fn handle<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn queue(&self) -> String { ... }
fn tries(&self) -> i16 { ... }
fn timeout(&self) -> i16 { ... }
fn backoff(&self, attempt: u32) -> u32 { ... }
fn failed<'life0, 'async_trait>(
&'life0 self,
_err: Error,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
The name of the queue the job should be dispatched to.
The number of times the job may be attempted.
The number of seconds the job can run before timing out.
Calculate the number of seconds to wait before retrying the job.
Serialize this value into the given Serde serializer.
Read more
Serialize this value into the given Serde serializer.
Read more
Serialize this value into the given Serde serializer.
Read more
Serialize this value into the given Serde serializer.
Read more