pub struct GeminiStreamCollector { /* private fields */ }Expand description
Collects native chunks without retaining a second copy of the event log. Content is incremental; usage and non-content metadata are native cumulative snapshots. A failed push poisons the collector so partial state cannot pass.
Implementations§
Source§impl GeminiStreamCollector
impl GeminiStreamCollector
pub fn new(limits: GeminiStreamLimits) -> Self
pub fn push( &mut self, chunk: GenerateContentResponseBody, ) -> Result<(), TransformError>
Sourcepub fn finish(
self,
) -> Result<Converted<GenerateContentResponseBody>, TransformError>
pub fn finish( self, ) -> Result<Converted<GenerateContentResponseBody>, TransformError>
EOF is successful only once every observed candidate has a terminal reason, or the prompt was explicitly blocked before creating candidates.
Auto Trait Implementations§
impl Freeze for GeminiStreamCollector
impl RefUnwindSafe for GeminiStreamCollector
impl Send for GeminiStreamCollector
impl Sync for GeminiStreamCollector
impl Unpin for GeminiStreamCollector
impl UnsafeUnpin for GeminiStreamCollector
impl UnwindSafe for GeminiStreamCollector
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