pub struct Streamer { /* private fields */ }
Expand description
Implements pagination on top of a SnapshotReceiver channel.
Implementations§
Source§impl Streamer
impl Streamer
pub fn new(dest: SnapshotReceiverProxy) -> Streamer
Sourcepub async fn push_element(
self,
elem: SnapshotElement,
) -> Result<Streamer, Error>
pub async fn push_element( self, elem: SnapshotElement, ) -> Result<Streamer, Error>
Sends the given elem
.
This method internally flushes the outgoing buffer, if necessary, so that it never exceeds the maximum allowed size.
Sourcepub async fn end_of_stream(self) -> Result<(), Error>
pub async fn end_of_stream(self) -> Result<(), Error>
Sends the end-of-stream marker.
Auto Trait Implementations§
impl Freeze for Streamer
impl !RefUnwindSafe for Streamer
impl Send for Streamer
impl Sync for Streamer
impl Unpin for Streamer
impl !UnwindSafe for Streamer
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