pub struct TaskHandle { /* private fields */ }Expand description
A handle given to a background task, allowing it to share its history Arc into the
task table so the control plane can peek at the message chunks it submits to the LLM.
Clone is cheap (inner Arc + small string).
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub fn attach_history(&self, history: Arc<dyn History>)
pub fn attach_history(&self, history: Arc<dyn History>)
Shares this task’s history handle into the task table. Called by the spawn_agent
background path before constructing a child turn, passing the child turn’s history
Arc — afterwards peek can snapshot the message chunks the child agent has
committed. The task entry may have already been evicted (in extreme cases the task
finishes instantly and is dropped by FIFO), in which case the operation is
silently ignored.
Trait Implementations§
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Source§fn clone(&self) -> TaskHandle
fn clone(&self) -> TaskHandle
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 TaskHandle
impl RefUnwindSafe for TaskHandle
impl Send for TaskHandle
impl Sync for TaskHandle
impl Unpin for TaskHandle
impl UnsafeUnpin for TaskHandle
impl UnwindSafe for TaskHandle
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