pub struct WatchCursor(/* private fields */);Expand description
Opaque position in a watch stream for resuming after disconnect.
Backends store whatever they need to resume (NATS: u64 revision).
Callers should treat this as opaque and only pass it back to
watch_all_from / watch_prefix_from.
Implementations§
Source§impl WatchCursor
impl WatchCursor
Sourcepub fn is_none(&self) -> bool
pub fn is_none(&self) -> bool
Returns true if this cursor has no position (will trigger full watch).
Sourcepub fn from_version(token: VersionToken) -> Self
pub fn from_version(token: VersionToken) -> Self
Create a cursor from a version token.
Trait Implementations§
Source§impl Clone for WatchCursor
impl Clone for WatchCursor
Source§fn clone(&self) -> WatchCursor
fn clone(&self) -> WatchCursor
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 moreSource§impl Debug for WatchCursor
impl Debug for WatchCursor
Source§impl Default for WatchCursor
impl Default for WatchCursor
Source§fn default() -> WatchCursor
fn default() -> WatchCursor
Returns the “default value” for a type. Read more
impl Eq for WatchCursor
Source§impl PartialEq for WatchCursor
impl PartialEq for WatchCursor
Source§fn eq(&self, other: &WatchCursor) -> bool
fn eq(&self, other: &WatchCursor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WatchCursor
Auto Trait Implementations§
impl Freeze for WatchCursor
impl RefUnwindSafe for WatchCursor
impl Send for WatchCursor
impl Sync for WatchCursor
impl Unpin for WatchCursor
impl UnsafeUnpin for WatchCursor
impl UnwindSafe for WatchCursor
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