pub struct StreamResult {
pub stream: BoxStream<Result<StreamPart>>,
pub request: Option<RequestInfo>,
pub response: Option<StreamResponse>,
}Expand description
Result of super::LanguageModel::do_stream.
Owns the stream of StreamParts. Each item is a Result so the
transport can surface partial failures; in-stream provider errors are
delivered as StreamPart::Error (still Ok).
Fields§
§stream: BoxStream<Result<StreamPart>>Yielded parts.
request: Option<RequestInfo>Request info (telemetry).
response: Option<StreamResponse>Response headers captured at stream start.
Auto Trait Implementations§
impl Freeze for StreamResult
impl !RefUnwindSafe for StreamResult
impl Send for StreamResult
impl !Sync for StreamResult
impl Unpin for StreamResult
impl UnsafeUnpin for StreamResult
impl !UnwindSafe for StreamResult
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