pub struct ResponseStream<'a> { /* private fields */ }Expand description
A response stream that yields ClaudeOutput messages Holds a reference to the client to read from
Implementations§
Source§impl ResponseStream<'_>
impl ResponseStream<'_>
Sourcepub async fn collect(self) -> Result<Vec<ClaudeOutput>>
pub async fn collect(self) -> Result<Vec<ClaudeOutput>>
Convert to a vector by collecting all responses
Sourcepub async fn next(&mut self) -> Option<Result<ClaudeOutput>>
pub async fn next(&mut self) -> Option<Result<ClaudeOutput>>
Get the next response
Auto Trait Implementations§
impl<'a> Freeze for ResponseStream<'a>
impl<'a> !RefUnwindSafe for ResponseStream<'a>
impl<'a> Send for ResponseStream<'a>
impl<'a> Sync for ResponseStream<'a>
impl<'a> Unpin for ResponseStream<'a>
impl<'a> !UnwindSafe for ResponseStream<'a>
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