pub struct ResponseReader {
pub receiver: UnboundedReceiverStream<Result<StreamChoice>>,
pub message: Message,
pub is_ready: bool,
pub context: bool,
}
Expand description
Chat stream reader
Fields§
§receiver: UnboundedReceiverStream<Result<StreamChoice>>
§message: Message
§is_ready: bool
§context: bool
Implementations§
Source§impl ResponseReader
impl ResponseReader
Sourcepub fn new(
receiver: UnboundedReceiverStream<Result<StreamChoice>>,
context: bool,
) -> Self
pub fn new( receiver: UnboundedReceiverStream<Result<StreamChoice>>, context: bool, ) -> Self
Creates a new stream reader
Sourcepub async fn next(&mut self) -> Option<Result<StreamChoice>>
pub async fn next(&mut self) -> Option<Result<StreamChoice>>
Iters next stream choice
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResponseReader
impl RefUnwindSafe for ResponseReader
impl Send for ResponseReader
impl Sync for ResponseReader
impl Unpin for ResponseReader
impl UnwindSafe for ResponseReader
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