pub struct SendHandle<P>where
P: ChatProvider,{ /* private fields */ }Expand description
Handle returned by Agent::send.
Holds an AgentRuntime<Acquired> — cannot send again until wait() completes.
The react_loop runs in a background task; you can query session context via
session_context while it is in progress.
§Awaiting
let handle = agent.send("Hello", rt).await?;
let (_rt, resp) = handle.await?; // IntoFuture → (Idle, ChatResponse)Implementations§
Source§impl<P> SendHandle<P>where
P: ChatProvider,
impl<P> SendHandle<P>where
P: ChatProvider,
Sourcepub async fn session_context(&self) -> Vec<Value>
pub async fn session_context(&self) -> Vec<Value>
Query session context while react_loop is running.
Trait Implementations§
Source§impl<P> IntoFuture for SendHandle<P>where
P: ChatProvider + 'static,
impl<P> IntoFuture for SendHandle<P>where
P: ChatProvider + 'static,
Source§type Output = Result<(AgentRuntime<P>, ChatResponse), OrchestrateError>
type Output = Result<(AgentRuntime<P>, ChatResponse), OrchestrateError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <SendHandle<P> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SendHandle<P> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> <SendHandle<P> as IntoFuture>::IntoFuture
fn into_future(self) -> <SendHandle<P> as IntoFuture>::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<P> !RefUnwindSafe for SendHandle<P>
impl<P> !UnwindSafe for SendHandle<P>
impl<P> Freeze for SendHandle<P>
impl<P> Send for SendHandle<P>
impl<P> Sync for SendHandle<P>
impl<P> Unpin for SendHandle<P>
impl<P> UnsafeUnpin for SendHandle<P>
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