pub struct StreamChunkContext<'a, T = ()> {
pub operation: &'a str,
pub model: &'a str,
pub request_json: &'a str,
pub chunk_json: &'a str,
pub chunk_index: usize,
pub state: &'a T,
}Expand description
Context provided for each chunk in a streaming response.
This context allows interceptors to process streaming data as it arrives, useful for real-time monitoring or transformation.
Fields§
§operation: &'a strThe operation being performed
model: &'a strThe model being used
request_json: &'a strThe original request body as JSON
chunk_json: &'a strThe current chunk data as JSON
chunk_index: usizeZero-based index of this chunk
state: &'a TTyped state from the request context
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for StreamChunkContext<'a, T>
impl<'a, T> RefUnwindSafe for StreamChunkContext<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for StreamChunkContext<'a, T>where
T: Sync,
impl<'a, T> Sync for StreamChunkContext<'a, T>where
T: Sync,
impl<'a, T> Unpin for StreamChunkContext<'a, T>
impl<'a, T> UnwindSafe for StreamChunkContext<'a, T>where
T: RefUnwindSafe,
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