pub type CancelTaskResult = Task;Expand description
Response from tasks/cancel containing updated task with cancelled status
This is a type alias - the response is a Task object with status: Cancelled.
Aliased Type§
pub struct CancelTaskResult {
pub task_id: String,
pub status: TaskStatus,
pub status_message: Option<String>,
pub created_at: String,
pub last_updated_at: String,
pub ttl: Option<u64>,
pub poll_interval: Option<u64>,
}Fields§
§task_id: StringUnique identifier for this task
MUST be generated by receiver with cryptographic entropy (e.g., UUID v4). Task IDs are the primary access control mechanism.
status: TaskStatusCurrent task status
status_message: Option<String>Optional human-readable status message
Usage by status:
Cancelled: Reason for cancellationCompleted: Summary of resultsFailed: Diagnostic info, error detailsWorking/InputRequired: Progress updates
created_at: StringISO 8601 timestamp when task was created
Format: YYYY-MM-DDTHH:MM:SSZ (UTC)
TTL is measured from this timestamp.
last_updated_at: StringISO 8601 timestamp when task was last updated
Format: YYYY-MM-DDTHH:MM:SSZ (UTC)
Updated whenever task status or other fields change.
ttl: Option<u64>Time-to-live in milliseconds from creation
Some(ms): Task expires after this duration fromcreated_atNone: Unlimited retention (use with caution)
After expiry, receiver MAY delete task and results. Shorter TTLs improve security by reducing task ID exposure.
poll_interval: Option<u64>Suggested polling interval in milliseconds
Requestors SHOULD respect this value to avoid excessive polling. Receivers MAY adjust based on task complexity and load.