pub enum Precondition {
New,
Exists,
ExpectedVersion(Version),
}Expand description
A precondition that must be upheld for a command to be executed or for events to be persisted.
Variants§
New
Requires that the target aggregate must not have had any events previously applied to it.
Exists
Requires that the target event at least exist, whether as a snapshot, or as having had at least one event applied.
ExpectedVersion(Version)
Requires that the target aggregate have the exact version specified.
Implementations§
Trait Implementations§
Source§impl Clone for Precondition
impl Clone for Precondition
Source§fn clone(&self) -> Precondition
fn clone(&self) -> Precondition
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 Debug for Precondition
impl Debug for Precondition
Source§impl Display for Precondition
impl Display for Precondition
Source§impl From<Version> for Precondition
impl From<Version> for Precondition
Source§impl Hash for Precondition
impl Hash for Precondition
Source§impl PartialEq for Precondition
impl PartialEq for Precondition
impl Copy for Precondition
impl Eq for Precondition
impl StructuralPartialEq for Precondition
Auto Trait Implementations§
impl Freeze for Precondition
impl RefUnwindSafe for Precondition
impl Send for Precondition
impl Sync for Precondition
impl Unpin for Precondition
impl UnwindSafe for Precondition
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