pub enum ExpectedVersion {
AnyVersion,
NoStream,
StreamExists,
Version(u64),
}
Expand description
The ExpectedVersion
used to define optimistic concurrency
Variants§
AnyVersion
Define that we expect a stream in any version
NoStream
Define that we expect a non existing stream
StreamExists
Define that we expect an existing stream
Version(u64)
Define that we expect a stream in a particular version
Implementations§
source§impl ExpectedVersion
impl ExpectedVersion
pub const fn verify(stream: &Stream, expected: &Self) -> ExpectedVersionResult
Trait Implementations§
source§impl Debug for ExpectedVersion
impl Debug for ExpectedVersion
source§impl PartialEq<ExpectedVersion> for ExpectedVersion
impl PartialEq<ExpectedVersion> for ExpectedVersion
source§fn eq(&self, other: &ExpectedVersion) -> bool
fn eq(&self, other: &ExpectedVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ExpectedVersion
Auto Trait Implementations§
impl RefUnwindSafe for ExpectedVersion
impl Send for ExpectedVersion
impl Sync for ExpectedVersion
impl Unpin for ExpectedVersion
impl UnwindSafe for ExpectedVersion
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