pub struct ResponseStream { /* private fields */ }Expand description
An async stream of text chunks produced by LanguageModelSession::stream.
Each item is Ok(ResponseText) for a new chunk, or Err(Error) if generation failed.
The stream ends when the model finishes generating.
Implements futures_core::Stream; use with .next() from StreamExt or
any executor that can drive Stream.
Trait Implementations§
Source§impl Stream for ResponseStream
impl Stream for ResponseStream
Auto Trait Implementations§
impl Freeze for ResponseStream
impl !RefUnwindSafe for ResponseStream
impl Send for ResponseStream
impl Sync for ResponseStream
impl Unpin for ResponseStream
impl UnsafeUnpin for ResponseStream
impl !UnwindSafe for ResponseStream
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