pub struct StoredTask {
pub task: A2ATask,
pub result: Option<A2ATaskResult>,
pub error: Option<String>,
pub trace_id: Option<String>,
pub created_at: Instant,
pub updated_at: Instant,
}Expand description
A task snapshot stored by the server.
Wraps the protocol-visible A2ATask with server-only bookkeeping: the
terminal result/error payloads and created_at/updated_at timestamps
used for TTL expiry and LRU eviction (P1-2).
Fields§
§task: A2ATaskThe protocol-visible task.
result: Option<A2ATaskResult>Result of the task (present when the task completed).
error: Option<String>Error message (present when the task failed).
trace_id: Option<String>W3C-style trace id carried on the request that created this task (P1-5).
Server-only bookkeeping so a distributed trace can be correlated with a task after creation; the protocol-visible task itself does not expose it.
created_at: InstantWhen the task was created.
updated_at: InstantWhen the task was last modified.
Implementations§
Source§impl StoredTask
impl StoredTask
Sourcepub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
pub fn with_trace_id(self, trace_id: impl Into<String>) -> Self
Attach the trace id that created this task (P1-5).
Trait Implementations§
Source§impl Clone for StoredTask
impl Clone for StoredTask
Source§fn clone(&self) -> StoredTask
fn clone(&self) -> StoredTask
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StoredTask
impl RefUnwindSafe for StoredTask
impl Send for StoredTask
impl Sync for StoredTask
impl Unpin for StoredTask
impl UnsafeUnpin for StoredTask
impl UnwindSafe for StoredTask
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