pub struct StreamCursor(pub Bytes);Expand description
Opaque, backend-versioned cursor. Consumers persist the bytes, hand
them back on resume. The first byte MUST encode a backend-family +
version prefix so cursors stay stable across backend upgrades
(Valkey: 0x01, Postgres: 0x02, …). The remainder is backend-
specific.
StreamCursor::empty is the “start from tail / now” sentinel
every backend accepts. Cursor byte order is owner-adjudicated
opaque — consumers MUST NOT parse the bytes.
Tuple Fields§
§0: BytesImplementations§
Source§impl StreamCursor
impl StreamCursor
Sourcepub fn new(raw: impl Into<Bytes>) -> Self
pub fn new(raw: impl Into<Bytes>) -> Self
Wrap arbitrary cursor bytes — typically only called by backend impls that just encoded a fresh cursor from a backend-native position (Valkey stream id, Postgres event_id).
Trait Implementations§
Source§impl Clone for StreamCursor
impl Clone for StreamCursor
Source§fn clone(&self) -> StreamCursor
fn clone(&self) -> StreamCursor
Returns a duplicate of the value. Read more
1.0.0 · 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 StreamCursor
impl Debug for StreamCursor
Source§impl PartialEq for StreamCursor
impl PartialEq for StreamCursor
impl Eq for StreamCursor
impl StructuralPartialEq for StreamCursor
Auto Trait Implementations§
impl !Freeze for StreamCursor
impl RefUnwindSafe for StreamCursor
impl Send for StreamCursor
impl Sync for StreamCursor
impl Unpin for StreamCursor
impl UnsafeUnpin for StreamCursor
impl UnwindSafe for StreamCursor
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