pub struct Optimistic;Expand description
Optimistic concurrency control - version checked on every write.
This is the default concurrency strategy for
Repository. With this strategy, the repository tracks
the stream version when loading an aggregate and verifies it hasn’t changed
before appending new events. If the version changed (another writer appended
events), the operation fails with a ConcurrencyConflict error.
Trait Implementations§
Source§impl Clone for Optimistic
impl Clone for Optimistic
Source§fn clone(&self) -> Optimistic
fn clone(&self) -> Optimistic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConcurrencyStrategy for Optimistic
impl ConcurrencyStrategy for Optimistic
Source§const CHECK_VERSION: bool = true
const CHECK_VERSION: bool = true
Whether this strategy checks versions before appending.
Source§impl Debug for Optimistic
impl Debug for Optimistic
Source§impl Default for Optimistic
impl Default for Optimistic
Source§fn default() -> Optimistic
fn default() -> Optimistic
Returns the “default value” for a type. Read more
impl Copy for Optimistic
Auto Trait Implementations§
impl Freeze for Optimistic
impl RefUnwindSafe for Optimistic
impl Send for Optimistic
impl Sync for Optimistic
impl Unpin for Optimistic
impl UnwindSafe for Optimistic
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