pub struct Job { /* private fields */ }
Implementations§
source§impl Job
impl Job
pub fn new<K, P>(kind: K, payload: P) -> Self
pub fn with_queue<S: Into<String>>(self, queue: S) -> Self
pub fn with_new_id<S: Into<String>>(self) -> Self
pub fn with_id<S: Into<String>>(self, id: S) -> Self
pub fn id(&self) -> &str
pub fn queue(&self) -> &str
pub fn kind(&self) -> &str
pub fn created_at(&self) -> &Option<OffsetDateTime>
pub fn updated_at(&self) -> &Option<OffsetDateTime>
pub fn payload(&self) -> &Value
pub fn with_attempts(self, attempts: u16) -> Self
pub fn attempts(&self) -> u16
pub fn with_max_attempts(self, max_attempts: u16) -> Self
pub fn max_attempts(&self) -> u16
pub fn with_lease_time(self, lease_time: Duration) -> Self
pub fn lease_time(&self) -> &Duration
pub fn with_schedule_at(self, date_time: OffsetDateTime) -> Self
pub fn with_schedule_now(self) -> Self
pub fn with_schedule_in(self, duration: Duration) -> Self
pub fn scheduled_at(&self) -> &Option<OffsetDateTime>
pub fn with_error_reason(self, error_reason: Option<Value>) -> Self
pub fn error_reason(&self) -> &Option<Value>
pub fn priority(&self) -> u8
pub fn with_priority(self, priority: u8) -> Self
pub fn unique_key(&self) -> &Option<String>
pub fn with_unique_key(self, unique_key: Option<String>) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Job
impl<'de> Deserialize<'de> for Job
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnwindSafe for Job
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