pub struct StreamAggregator { /* private fields */ }Implementations§
Source§impl StreamAggregator
impl StreamAggregator
pub fn new() -> Self
pub fn push(&mut self, chunk: StreamChunk)
pub fn message_id(&self) -> Option<MessageId>
pub fn text(&self) -> &str
pub fn stop_reason(&self) -> Option<&StopReason>
pub fn is_complete(&self) -> bool
pub fn has_error(&self) -> bool
pub fn error(&self) -> Option<(&str, &str)>
pub fn input_tokens(&self) -> u32
pub fn output_tokens(&self) -> u32
pub fn total_tokens(&self) -> u32
pub fn tool_use_count(&self) -> usize
pub fn has_tool_use(&self) -> bool
pub fn clear(&mut self)
Trait Implementations§
Source§impl Default for StreamAggregator
impl Default for StreamAggregator
Source§fn default() -> StreamAggregator
fn default() -> StreamAggregator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamAggregator
impl RefUnwindSafe for StreamAggregator
impl Send for StreamAggregator
impl Sync for StreamAggregator
impl Unpin for StreamAggregator
impl UnwindSafe for StreamAggregator
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