pub struct AgentTaskContext {
pub task_id: String,
pub cancel_token: CancellationToken,
pub inbox_sender: InboxSender,
pub inbox_receiver: InboxReceiver,
}Expand description
Runtime context passed to sub-agent task closures.
Exposes the spawned task’s stable task_id so nested agent execution can
publish lineage metadata (for example, self-cancel and cascading child
cancellation).
Fields§
§task_id: StringUnique identifier of the spawned background task.
cancel_token: CancellationTokenShared cancellation token for the task.
inbox_sender: InboxSenderInbox sender used by nested children to deliver live events/messages.
inbox_receiver: InboxReceiverInbox receiver consumed by the task’s inner agent loop.
Auto Trait Implementations§
impl Freeze for AgentTaskContext
impl !RefUnwindSafe for AgentTaskContext
impl Send for AgentTaskContext
impl Sync for AgentTaskContext
impl Unpin for AgentTaskContext
impl UnsafeUnpin for AgentTaskContext
impl !UnwindSafe for AgentTaskContext
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