pub struct VersionedDelivery {
pub version: EventVersion,
}Expand description
Tracks the last delivered version for gapless client-side verification.
Fields§
§version: EventVersionImplementations§
Source§impl VersionedDelivery
impl VersionedDelivery
pub fn first(version: EventVersion) -> Self
Sourcepub fn verify_next(&self, event: &StreamEvent) -> Result<EventVersion>
pub fn verify_next(&self, event: &StreamEvent) -> Result<EventVersion>
Verify that event continues the monotonic version sequence.
Sourcepub fn verify_initial(
last_delivered: Option<EventVersion>,
event: &StreamEvent,
) -> Result<EventVersion>
pub fn verify_initial( last_delivered: Option<EventVersion>, event: &StreamEvent, ) -> Result<EventVersion>
Verify the first event in a replay sequence.
Trait Implementations§
Source§impl Clone for VersionedDelivery
impl Clone for VersionedDelivery
Source§fn clone(&self) -> VersionedDelivery
fn clone(&self) -> VersionedDelivery
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 moreimpl Copy for VersionedDelivery
Source§impl Debug for VersionedDelivery
impl Debug for VersionedDelivery
impl Eq for VersionedDelivery
Source§impl PartialEq for VersionedDelivery
impl PartialEq for VersionedDelivery
impl StructuralPartialEq for VersionedDelivery
Auto Trait Implementations§
impl Freeze for VersionedDelivery
impl RefUnwindSafe for VersionedDelivery
impl Send for VersionedDelivery
impl Sync for VersionedDelivery
impl Unpin for VersionedDelivery
impl UnsafeUnpin for VersionedDelivery
impl UnwindSafe for VersionedDelivery
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