pub struct SubagentRuns { /* private fields */ }Expand description
The registry of children in flight.
Create one, give a clone to the agent with
AgentBuilder::subagents and one to the
tool that starts children. The agent forwards the events the registry
receives onto its own stream; a host lists and cancels children through
any clone.
Implementations§
Source§impl SubagentRuns
impl SubagentRuns
Sourcepub fn start(
&self,
started_by: &CallIdentity,
name: &str,
prompt: &str,
) -> SubagentRun
pub fn start( &self, started_by: &CallIdentity, name: &str, prompt: &str, ) -> SubagentRun
Registers a child named name that the call started_by starts
with prompt, and announces it on the parent’s stream.
§Panics
Panics if the registry lock is poisoned.
Sourcepub fn list(&self) -> Vec<SubagentRunInfo>
pub fn list(&self) -> Vec<SubagentRunInfo>
Sourcepub fn cancel_all(&self) -> usize
pub fn cancel_all(&self) -> usize
Cancels every child in flight; returns how many were signalled.
§Panics
Panics if the registry lock is poisoned.
Trait Implementations§
Source§impl Clone for SubagentRuns
impl Clone for SubagentRuns
Source§impl Debug for SubagentRuns
impl Debug for SubagentRuns
Auto Trait Implementations§
impl Forget for SubagentRuns
impl Freeze for SubagentRuns
impl Move for SubagentRuns
impl RefUnwindSafe for SubagentRuns
impl Send for SubagentRuns
impl Sync for SubagentRuns
impl Unpin for SubagentRuns
impl UnsafeUnpin for SubagentRuns
impl UnwindSafe for SubagentRuns
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