pub struct OrchestratedHandle { /* private fields */ }Expand description
Handle to a spawned orchestrated agent.
Provides request/response messaging, status polling, and cancellation.
Lifecycle methods (status, cancel, is_done) are delegated to a shared task core.
Implementations§
Source§impl OrchestratedHandle
impl OrchestratedHandle
Sourcepub async fn send_message(
&self,
text: impl Into<String>,
) -> Result<AgentResult, AgentError>
pub async fn send_message( &self, text: impl Into<String>, ) -> Result<AgentResult, AgentError>
Send a text message to the running agent and await its response.
Sourcepub async fn send_messages(
&self,
messages: Vec<AgentMessage>,
) -> Result<AgentResult, AgentError>
pub async fn send_messages( &self, messages: Vec<AgentMessage>, ) -> Result<AgentResult, AgentError>
Send multiple messages to the agent and await its response.
Sourcepub async fn await_result(self) -> Result<AgentResult, AgentError>
pub async fn await_result(self) -> Result<AgentResult, AgentError>
Consume the handle and await the agent’s final result.
Drops the request channel so the agent shuts down after processing any remaining requests.
Sourcepub fn status(&self) -> AgentStatus
pub fn status(&self) -> AgentStatus
Current status of the agent.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrchestratedHandle
impl RefUnwindSafe for OrchestratedHandle
impl Send for OrchestratedHandle
impl Sync for OrchestratedHandle
impl Unpin for OrchestratedHandle
impl UnsafeUnpin for OrchestratedHandle
impl UnwindSafe for OrchestratedHandle
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