pub enum RepositoryError {
LockPoisoned(&'static str),
Lock(LockError),
ConcurrentWrite {
id: String,
expected: u64,
actual: u64,
},
DuplicateStreamInBatch {
id: String,
},
DuplicateOutboxMessageInBatch {
id: String,
},
DuplicateInboxReceipt {
consumer: String,
message_id: String,
},
InvalidInboxReceipt {
consumer: String,
message_id: String,
},
InvalidStreamIdentity {
aggregate_type: String,
aggregate_id: String,
reason: String,
},
NotFound {
id: String,
},
InvalidState {
id: String,
expected: &'static str,
actual: String,
},
Replay(String),
Model(String),
}Variants§
LockPoisoned(&'static str)
Lock(LockError)
ConcurrentWrite
DuplicateStreamInBatch
DuplicateOutboxMessageInBatch
DuplicateInboxReceipt
A consumer inbox receipt (consumer, message_id) was already recorded.
The commit is rolled back so the consumer’s effects are not double-applied;
the message has already been processed (an at-least-once replay).
InvalidInboxReceipt
A consumer inbox receipt had an empty consumer or message_id. Rejected
uniformly across backends before any write (the relational CHECK
constraints are a defense-in-depth backstop).
InvalidStreamIdentity
NotFound
InvalidState
Replay(String)
Model(String)
Trait Implementations§
Source§impl Clone for RepositoryError
impl Clone for RepositoryError
Source§fn clone(&self) -> RepositoryError
fn clone(&self) -> RepositoryError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RepositoryError
impl Debug for RepositoryError
Source§impl Display for RepositoryError
impl Display for RepositoryError
Source§impl Error for RepositoryError
impl Error for RepositoryError
1.30.0 · 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<EventRecordError> for RepositoryError
impl From<EventRecordError> for RepositoryError
Source§fn from(err: EventRecordError) -> Self
fn from(err: EventRecordError) -> Self
Converts to this type from the input type.
Source§impl From<LockError> for RepositoryError
impl From<LockError> for RepositoryError
Source§impl From<ReadModelError> for RepositoryError
impl From<ReadModelError> for RepositoryError
Source§fn from(err: ReadModelError) -> Self
fn from(err: ReadModelError) -> Self
Converts to this type from the input type.
Source§impl From<RepositoryError> for HandlerError
impl From<RepositoryError> for HandlerError
Source§fn from(err: RepositoryError) -> Self
fn from(err: RepositoryError) -> Self
Converts to this type from the input type.
Source§impl From<RepositoryError> for TransportError
Repository/store failures (lock contention, storage hiccups, stale-claim
conflicts) are retryable: usually transient, resolved by a later re-claim. This
conversion lives with the outbox bridge — which legitimately knows both the
store and the bus — so bus core stays free of RepositoryError.
impl From<RepositoryError> for TransportError
Repository/store failures (lock contention, storage hiccups, stale-claim
conflicts) are retryable: usually transient, resolved by a later re-claim. This
conversion lives with the outbox bridge — which legitimately knows both the
store and the bus — so bus core stays free of RepositoryError.
Source§fn from(error: RepositoryError) -> Self
fn from(error: RepositoryError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RepositoryError
impl PartialEq for RepositoryError
Source§fn eq(&self, other: &RepositoryError) -> bool
fn eq(&self, other: &RepositoryError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RepositoryError
impl StructuralPartialEq for RepositoryError
Auto Trait Implementations§
impl Freeze for RepositoryError
impl RefUnwindSafe for RepositoryError
impl Send for RepositoryError
impl Sync for RepositoryError
impl Unpin for RepositoryError
impl UnsafeUnpin for RepositoryError
impl UnwindSafe for RepositoryError
Blanket Implementations§
Source§impl<T> AsyncAggregateBuilder for T
impl<T> AsyncAggregateBuilder for T
fn async_aggregate<A: Aggregate>(self) -> AsyncAggregateRepository<Self, A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Queueable for T
impl<T> Queueable for T
Source§fn queued_async(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
fn queued_async(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
Wrap with the default async lock manager. Pair with
.async_aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_async_with<L: AsyncLockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_async_with<L: AsyncLockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.