pub struct SendStreamHandle<P: ChatProvider> { /* private fields */ }Expand description
Handle returned by Agent::send_stream.
Like SendHandle but also provides recv() for per-event streaming.
Implementations§
Source§impl<P: ChatProvider> SendStreamHandle<P>
impl<P: ChatProvider> SendStreamHandle<P>
Sourcepub async fn recv(&mut self) -> Option<AgentEvent>
pub async fn recv(&mut self) -> Option<AgentEvent>
Receive the next streaming event.
Sourcepub async fn session_context(&self) -> Vec<JsonValue>
pub async fn session_context(&self) -> Vec<JsonValue>
Query session context while streaming is in progress.
Trait Implementations§
Source§impl<P: ChatProvider + 'static> IntoFuture for SendStreamHandle<P>
impl<P: ChatProvider + 'static> IntoFuture for SendStreamHandle<P>
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 = <SendStreamHandle<P> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SendStreamHandle<P> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<P> !RefUnwindSafe for SendStreamHandle<P>
impl<P> !UnwindSafe for SendStreamHandle<P>
impl<P> Freeze for SendStreamHandle<P>
impl<P> Send for SendStreamHandle<P>
impl<P> Sync for SendStreamHandle<P>
impl<P> Unpin for SendStreamHandle<P>
impl<P> UnsafeUnpin for SendStreamHandle<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