pub struct ChatStreamAccumulator {
pub content: String,
pub reasoning_content: String,
pub tool_calls: Vec<ToolCallMessage>,
}Expand description
Accumulates streaming chat deltas into convenient final buffers.
Fields§
§content: String§reasoning_content: String§tool_calls: Vec<ToolCallMessage>Implementations§
Source§impl ChatStreamAccumulator
impl ChatStreamAccumulator
pub fn new() -> Self
pub fn push_chunk(&mut self, chunk: &ChatStreamResponse)
Trait Implementations§
Source§impl Clone for ChatStreamAccumulator
impl Clone for ChatStreamAccumulator
Source§fn clone(&self) -> ChatStreamAccumulator
fn clone(&self) -> ChatStreamAccumulator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChatStreamAccumulator
impl Debug for ChatStreamAccumulator
Source§impl Default for ChatStreamAccumulator
impl Default for ChatStreamAccumulator
Source§fn default() -> ChatStreamAccumulator
fn default() -> ChatStreamAccumulator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChatStreamAccumulator
impl RefUnwindSafe for ChatStreamAccumulator
impl Send for ChatStreamAccumulator
impl Sync for ChatStreamAccumulator
impl Unpin for ChatStreamAccumulator
impl UnsafeUnpin for ChatStreamAccumulator
impl UnwindSafe for ChatStreamAccumulator
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