pub struct Task {Show 14 fields
pub id: String,
pub tool_name: String,
pub arguments: Value,
pub status: TaskStatus,
pub created_at: Instant,
pub created_at_str: String,
pub ttl: u64,
pub poll_interval: u64,
pub progress: Option<f64>,
pub message: Option<String>,
pub result: Option<CallToolResult>,
pub error: Option<String>,
pub cancellation_token: CancellationToken,
pub completed_at: Option<Instant>,
}Expand description
Internal task representation with full state
Fields§
§id: StringUnique task identifier
tool_name: StringName of the tool being executed
arguments: ValueArguments passed to the tool
status: TaskStatusCurrent task status
created_at: InstantWhen the task was created
created_at_str: StringISO 8601 timestamp string
ttl: u64Time-to-live in seconds (for cleanup after completion)
poll_interval: u64Suggested polling interval in seconds
progress: Option<f64>Current progress (0.0 - 100.0)
message: Option<String>Human-readable status message
result: Option<CallToolResult>The result of the tool call (when completed)
error: Option<String>Error message (when failed)
cancellation_token: CancellationTokenCancellation token for aborting the task
completed_at: Option<Instant>When the task reached terminal status (for TTL tracking)
Implementations§
Trait Implementations§
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