pub struct Task {
pub created_at: String,
pub last_updated_at: String,
pub poll_interval: Option<i64>,
pub status: TaskStatus,
pub status_message: Option<String>,
pub task_id: String,
pub ttl: i64,
}Expand description
Data associated with a task.
JSON schema
{
"description": "Data associated with a task.",
"type": "object",
"required": [
"createdAt",
"lastUpdatedAt",
"status",
"taskId",
"ttl"
],
"properties": {
"createdAt": {
"description": "ISO 8601 timestamp when the task was created.",
"type": "string"
},
"lastUpdatedAt": {
"description": "ISO 8601 timestamp when the task was last updated.",
"type": "string"
},
"pollInterval": {
"description": "Suggested polling interval in milliseconds.",
"type": "integer"
},
"status": {
"$ref": "#/$defs/TaskStatus"
},
"statusMessage": {
"description": "Optional human-readable message describing the current task state.\nThis can provide context for any status, including:\n- Reasons for \"cancelled\" status\n- Summaries for \"completed\" status\n- Diagnostic information for \"failed\" status (e.g., error details, what went wrong)",
"type": "string"
},
"taskId": {
"description": "The task identifier.",
"type": "string"
},
"ttl": {
"description": "Actual retention duration from creation in milliseconds, null for unlimited.",
"type": "integer"
}
}
}Fields§
§created_at: StringISO 8601 timestamp when the task was created.
last_updated_at: StringISO 8601 timestamp when the task was last updated.
poll_interval: Option<i64>Suggested polling interval in milliseconds.
status: TaskStatus§status_message: Option<String>Optional human-readable message describing the current task state. This can provide context for any status, including: - Reasons for “cancelled” status - Summaries for “completed” status - Diagnostic information for “failed” status (e.g., error details, what went wrong)
task_id: StringThe task identifier.
ttl: i64Actual retention duration from creation in milliseconds, null for unlimited.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
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 Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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