pub struct DocketTask {
pub id: TaskId,
pub task_type: String,
pub params: Value,
pub priority: i32,
pub retry_count: u32,
pub max_retries: u32,
pub created_at: String,
pub claimed_at: Option<String>,
pub status: TaskStatus,
pub error: Option<String>,
pub result: Option<Value>,
}Expand description
A queued task in the Docket system.
Fields§
§id: TaskIdUnique task identifier.
task_type: StringTask type (determines which handler processes it).
params: ValueTask parameters.
priority: i32Task priority (higher = processed first).
retry_count: u32Number of retry attempts so far.
max_retries: u32Maximum retries allowed.
created_at: StringWhen the task was created.
claimed_at: Option<String>When the task was claimed by a worker.
status: TaskStatusCurrent task status.
error: Option<String>Error message if failed.
result: Option<Value>Task result if completed.
Implementations§
Source§impl DocketTask
impl DocketTask
Sourcepub fn to_task_info(&self) -> TaskInfo
pub fn to_task_info(&self) -> TaskInfo
Converts to TaskInfo for protocol responses.
Sourcepub fn to_task_result(&self) -> Option<TaskResult>
pub fn to_task_result(&self) -> Option<TaskResult>
Converts to TaskResult for protocol responses.
Trait Implementations§
Source§impl Clone for DocketTask
impl Clone for DocketTask
Source§fn clone(&self) -> DocketTask
fn clone(&self) -> DocketTask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocketTask
impl Debug for DocketTask
Source§impl<'de> Deserialize<'de> for DocketTask
impl<'de> Deserialize<'de> for DocketTask
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 DocketTask
impl RefUnwindSafe for DocketTask
impl Send for DocketTask
impl Sync for DocketTask
impl Unpin for DocketTask
impl UnwindSafe for DocketTask
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).