pub struct StreamingReceiver { /* private fields */ }Expand description
Receiver side — used by UI/consumer to read chunks.
Implementations§
Source§impl StreamingReceiver
impl StreamingReceiver
Sourcepub async fn next(&mut self) -> Option<StreamChunk>
pub async fn next(&mut self) -> Option<StreamChunk>
Receive next chunk. Returns None when sender is dropped.
Sourcepub async fn collect_all(&mut self) -> Vec<StreamChunk>
pub async fn collect_all(&mut self) -> Vec<StreamChunk>
Collect all chunks until Done or sender drops.
Auto Trait Implementations§
impl Freeze for StreamingReceiver
impl RefUnwindSafe for StreamingReceiver
impl Send for StreamingReceiver
impl Sync for StreamingReceiver
impl Unpin for StreamingReceiver
impl UnsafeUnpin for StreamingReceiver
impl UnwindSafe for StreamingReceiver
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