Struct StreamReader
pub struct StreamReader { /* private fields */ }Expand description
A reader of a run’s stream (crate::RunHandle::stream): yields each
chunk once it is durable, in order, and ends once the stream is
complete. Self::offset is where a reader that reconnects continues.
Implementations§
§impl StreamReader
impl StreamReader
pub fn of_run(self, run: RunId) -> Self
pub fn of_run(self, run: RunId) -> Self
Reads the stream of run (an earlier reader’s Self::run), not
the workflow ID’s newest run.
pub fn wait(self, wait: Duration) -> Self
pub fn wait(self, wait: Duration) -> Self
How long one read waits for a new chunk before it asks again (default 30 s); it only bounds a request, not the reader.
pub fn offset(&self) -> u64
pub fn offset(&self) -> u64
The offset of the chunk Self::next returns next.
pub fn end(&self) -> Option<&StreamEnd>
pub fn end(&self) -> Option<&StreamEnd>
How the stream ended, once Self::next returned None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamReader
impl !RefUnwindSafe for StreamReader
impl Send for StreamReader
impl Sync for StreamReader
impl Unpin for StreamReader
impl UnsafeUnpin for StreamReader
impl !UnwindSafe for StreamReader
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