pub enum EventStoreError {
ConcurrencyConflict {
aggregate_id: String,
expected: i64,
actual: i64,
},
AggregateNotFound {
aggregate_id: String,
},
InvalidSequence {
aggregate_id: String,
expected: i64,
actual: i64,
},
InvalidAudit {
aggregate_id: String,
event_index: usize,
source: AuditError,
},
Integrity {
source: IntegrityError,
},
DatabaseError {
message: String,
},
SerializationError {
message: String,
},
IoError(Error),
Unsupported,
Other {
message: String,
},
}Expand description
Errors that can occur during event store operations.
Variants§
ConcurrencyConflict
Optimistic concurrency conflict.
AggregateNotFound
InvalidSequence
InvalidAudit
One or more events in an append batch had invalid audit metadata.
Defense-in-depth: the bus should have caught this first.
Integrity
Stored event signatures are missing or do not match the recomputed integrity chain.
Fields
§
source: IntegrityErrorDatabaseError
SerializationError
IoError(Error)
Unsupported
The store does not implement snapshot persistence. Callers fall back to replaying the full event stream.
Other
Implementations§
Trait Implementations§
Source§impl Debug for EventStoreError
impl Debug for EventStoreError
Source§impl Display for EventStoreError
impl Display for EventStoreError
Source§impl Error for EventStoreError
impl Error for EventStoreError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for EventStoreError
impl From<Error> for EventStoreError
Source§impl From<IntegrityError> for EventStoreError
impl From<IntegrityError> for EventStoreError
Source§fn from(source: IntegrityError) -> Self
fn from(source: IntegrityError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for EventStoreError
impl !UnwindSafe for EventStoreError
impl Freeze for EventStoreError
impl Send for EventStoreError
impl Sync for EventStoreError
impl Unpin for EventStoreError
impl UnsafeUnpin for EventStoreError
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