Enum eventstore::ExpectedRevision
source · pub enum ExpectedRevision {
Any,
StreamExists,
NoStream,
Exact(u64),
}
Expand description
Constants used for expected version control. The use of expected version can be a bit tricky especially when discussing assurances given by the GetEventStore server.
The GetEventStore server will assure idempotency for all operations using
any value in ExpectedRevision
except ExpectedRevision::Any
. When using
ExpectedRevision::Any
, the GetEventStore server will do its best to assure
idempotency but will not guarantee idempotency.
Variants§
Any
This write should not conflict with anything and should always succeed.
StreamExists
The stream should exist. If it or a metadata stream does not exist, treats that as a concurrency problem.
NoStream
The stream being written to should not yet exist. If it does exist, treats that as a concurrency problem.
Exact(u64)
States that the last event written to the stream should have an event number matching your expected value.
Trait Implementations§
source§impl Clone for ExpectedRevision
impl Clone for ExpectedRevision
source§fn clone(&self) -> ExpectedRevision
fn clone(&self) -> ExpectedRevision
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ExpectedRevision
impl Debug for ExpectedRevision
source§impl Display for ExpectedRevision
impl Display for ExpectedRevision
source§impl PartialEq for ExpectedRevision
impl PartialEq for ExpectedRevision
source§fn eq(&self, other: &ExpectedRevision) -> bool
fn eq(&self, other: &ExpectedRevision) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ExpectedRevision
impl Eq for ExpectedRevision
impl StructuralPartialEq for ExpectedRevision
Auto Trait Implementations§
impl RefUnwindSafe for ExpectedRevision
impl Send for ExpectedRevision
impl Sync for ExpectedRevision
impl Unpin for ExpectedRevision
impl UnwindSafe for ExpectedRevision
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
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
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request