pub enum EventStoreError {
ConflictingExpectedVersions {
stream_id: StreamId,
first_version: StreamVersion,
second_version: StreamVersion,
},
UndeclaredStream {
stream_id: StreamId,
},
SerializationFailed {
stream_id: StreamId,
detail: String,
},
DeserializationFailed {
stream_id: StreamId,
detail: String,
},
StoreFailure {
operation: Operation,
},
VersionConflict,
}Expand description
Error type returned by event store operations.
EventStoreError represents failures during read or append operations, covering serialization, deserialization, version conflicts, infrastructure failures, and stream declaration violations.
Variants§
ConflictingExpectedVersions
Returned when a stream is assigned multiple different expected versions within the same write batch.
UndeclaredStream
Returned when append attempts are made against a stream that has not been registered with an expected version.
SerializationFailed
Returned when event serialization fails prior to persistence.
DeserializationFailed
Returned when stored event payloads cannot be deserialized into the requested type.
StoreFailure
Represents infrastructure failures surfaced by the backing store (e.g., connection drops).
VersionConflict
Version conflict during optimistic concurrency control.
Returned when append_events detects that the expected version does not match the current stream version, indicating a concurrent modification occurred between read and write.
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
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()