pub struct StreamToken {
pub stream_id: i64,
pub after_event: bool,
}Expand description
A parsed pagination position — see the module doc.
A t{stream_id} token (or a bare integer) sits ON event stream_id:
a backward page starts strictly before it, a forward page strictly after
it. A sync token s{stream_id}_{typing_gen} (a /sync next_batch or
prev_batch) sits AFTER event stream_id — that event was already
delivered — so a backward page from it must still include that event. The
typing half of a sync token is irrelevant to history and is ignored.
Fields§
§stream_id: i64§after_event: boolImplementations§
Source§impl StreamToken
impl StreamToken
Sourcepub fn backward_bound(self) -> i64
pub fn backward_bound(self) -> i64
The exclusive upper bound of a page that walks backward from this
position: events with stream_id < bound.
Sourcepub fn forward_bound(self) -> i64
pub fn forward_bound(self) -> i64
The exclusive lower bound of a page that walks forward from this
position: events with stream_id > bound.
Trait Implementations§
Source§impl Clone for StreamToken
impl Clone for StreamToken
impl Copy for StreamToken
Source§impl Debug for StreamToken
impl Debug for StreamToken
impl Eq for StreamToken
Source§impl PartialEq for StreamToken
impl PartialEq for StreamToken
impl StructuralPartialEq for StreamToken
Auto Trait Implementations§
impl Freeze for StreamToken
impl RefUnwindSafe for StreamToken
impl Send for StreamToken
impl Sync for StreamToken
impl Unpin for StreamToken
impl UnsafeUnpin for StreamToken
impl UnwindSafe for StreamToken
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.