pub struct Task {
pub id: u64,
pub agent: String,
pub description: String,
pub created_at: Instant,
pub session_id: Option<u64>,
pub handle: Option<JoinHandle<String>>,
pub result: Option<String>,
pub error: Option<String>,
}Expand description
A delegated unit of agent work.
Fields§
§id: u64Unique task identifier.
agent: StringAgent assigned to this task.
description: StringHuman-readable task description / message.
created_at: InstantWhen this task was created.
session_id: Option<u64>Session allocated for this task’s execution.
handle: Option<JoinHandle<String>>Background handle — resolves to the agent’s final response.
result: Option<String>Cached result after handle resolves.
error: Option<String>Cached error after handle resolves.
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 UnsafeUnpin 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