Skip to main content

RepositoryError

Enum RepositoryError 

Source
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

Fields

§expected: u64
§actual: u64
§

DuplicateStreamInBatch

Fields

§

DuplicateOutboxMessageInBatch

Fields

§

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).

Fields

§consumer: String
§message_id: String
§

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).

Fields

§consumer: String
§message_id: String
§

InvalidStreamIdentity

Fields

§aggregate_type: String
§aggregate_id: String
§reason: String
§

NotFound

Fields

§

InvalidState

Fields

§expected: &'static str
§actual: String
§

Replay(String)

§

Model(String)

Trait Implementations§

Source§

impl Clone for RepositoryError

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for RepositoryError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for RepositoryError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for RepositoryError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<EventRecordError> for RepositoryError

Source§

fn from(err: EventRecordError) -> Self

Converts to this type from the input type.
Source§

impl From<LockError> for RepositoryError

Source§

fn from(err: LockError) -> Self

Converts to this type from the input type.
Source§

impl From<ReadModelError> for RepositoryError

Source§

fn from(err: ReadModelError) -> Self

Converts to this type from the input type.
Source§

impl From<RepositoryError> for HandlerError

Source§

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.

Source§

fn from(error: RepositoryError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for RepositoryError

Source§

fn eq(&self, other: &RepositoryError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for RepositoryError

Source§

impl StructuralPartialEq for RepositoryError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsyncAggregateBuilder for T

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Queueable for T

Source§

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>

Wrap with a custom async lock manager.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.