pub struct WorkItem {
pub id: WorkItemId,
pub execution_id: ExecutionId,
pub node_id: String,
pub queue_type: String,
pub payload: Value,
pub attempt: u32,
pub max_attempts: u32,
pub created_at: DateTime<Utc>,
pub lease_expires_at: Option<DateTime<Utc>>,
pub worker_id: Option<String>,
pub tenant_id: String,
}Expand description
A unit of work dispatched to a worker queue.
Fields§
§id: WorkItemId§execution_id: ExecutionId§node_id: String§queue_type: String§payload: Value§attempt: u32§max_attempts: u32Maximum number of attempts before moving to dead-letter queue.
created_at: DateTime<Utc>§lease_expires_at: Option<DateTime<Utc>>§worker_id: Option<String>§tenant_id: StringTenant that owns this work item.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WorkItem
impl<'de> Deserialize<'de> for WorkItem
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 WorkItem
impl RefUnwindSafe for WorkItem
impl Send for WorkItem
impl Sync for WorkItem
impl Unpin for WorkItem
impl UnsafeUnpin for WorkItem
impl UnwindSafe for WorkItem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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