pub struct EventWatcher { /* private fields */ }Expand description
Long poll event consumer with caller visible cursor state.
Implementations§
Source§impl EventWatcher
impl EventWatcher
Sourcepub fn builder() -> EventWatcherBuilder
pub fn builder() -> EventWatcherBuilder
Start building an event watcher.
Sourcepub fn current_cursor(&self) -> Option<&EventCursor>
pub fn current_cursor(&self) -> Option<&EventCursor>
Return the cursor from the last successful batch.
Callers persist this value after applying each batch, then pass it to
EventWatcherBuilder::since when rebuilding a watcher.
Sourcepub fn seek(&mut self, cursor: EventCursor)
pub fn seek(&mut self, cursor: EventCursor)
Override the next request cursor.
Sourcepub async fn next(&mut self) -> Result<EventBatch, ClientError>
pub async fn next(&mut self) -> Result<EventBatch, ClientError>
Fetch the next event batch and advance this watcher’s cursor.
Trait Implementations§
Source§impl Clone for EventWatcher
impl Clone for EventWatcher
Source§fn clone(&self) -> EventWatcher
fn clone(&self) -> EventWatcher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EventWatcher
impl RefUnwindSafe for EventWatcher
impl Send for EventWatcher
impl Sync for EventWatcher
impl Unpin for EventWatcher
impl UnsafeUnpin for EventWatcher
impl UnwindSafe for EventWatcher
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