pub struct ReceiptStreamCursorV1 {
pub subscription_id_hash: [u8; 16],
pub receipt_kind_hash: [u8; 16],
pub hlc_wall_ms: u64,
pub position: PositionKind,
}Expand description
Versioned opaque receipt-stream cursor owned by syncbat.
Fields§
§subscription_id_hash: [u8; 16]Route binding hash for the subscription id.
receipt_kind_hash: [u8; 16]Route binding hash for the receipt kind filter.
hlc_wall_ms: u64Visible HLC wall milliseconds at the cursor point (metadata).
position: PositionKindCommit-order resume position encoded by the cursor.
Implementations§
Source§impl ReceiptStreamCursorV1
impl ReceiptStreamCursorV1
Sourcepub fn beginning(subscription_id: &str, receipt_kind: &str) -> Self
pub fn beginning(subscription_id: &str, receipt_kind: &str) -> Self
Encode the receipt-stream origin cursor for a route.
Sourcepub fn after_global_sequence(
subscription_id: &str,
receipt_kind: &str,
global_sequence: u64,
hlc_wall_ms: u64,
) -> Self
pub fn after_global_sequence( subscription_id: &str, receipt_kind: &str, global_sequence: u64, hlc_wall_ms: u64, ) -> Self
Encode a resume cursor strictly after global_sequence.
Sourcepub fn resume_after_global_sequence(&self) -> Option<u64>
pub fn resume_after_global_sequence(&self) -> Option<u64>
Return the exclusive lower bound for query_entries_after, if any.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, SubscriptionRuntimeError>
pub fn decode(bytes: &[u8]) -> Result<Self, SubscriptionRuntimeError>
Sourcepub fn validate_route(
&self,
subscription_id: &str,
receipt_kind: &str,
) -> Result<(), SubscriptionRuntimeError>
pub fn validate_route( &self, subscription_id: &str, receipt_kind: &str, ) -> Result<(), SubscriptionRuntimeError>
Validate cursor binding against a receipt-stream subscription route.
§Errors
Trait Implementations§
Source§impl Clone for ReceiptStreamCursorV1
impl Clone for ReceiptStreamCursorV1
Source§fn clone(&self) -> ReceiptStreamCursorV1
fn clone(&self) -> ReceiptStreamCursorV1
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 ReceiptStreamCursorV1
impl Debug for ReceiptStreamCursorV1
impl Eq for ReceiptStreamCursorV1
Source§impl PartialEq for ReceiptStreamCursorV1
impl PartialEq for ReceiptStreamCursorV1
Source§fn eq(&self, other: &ReceiptStreamCursorV1) -> bool
fn eq(&self, other: &ReceiptStreamCursorV1) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReceiptStreamCursorV1
Auto Trait Implementations§
impl Freeze for ReceiptStreamCursorV1
impl RefUnwindSafe for ReceiptStreamCursorV1
impl Send for ReceiptStreamCursorV1
impl Sync for ReceiptStreamCursorV1
impl Unpin for ReceiptStreamCursorV1
impl UnsafeUnpin for ReceiptStreamCursorV1
impl UnwindSafe for ReceiptStreamCursorV1
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more