pub enum OutboxError {
InfrastructureError(String),
DuplicateEvent,
DatabaseError(String),
BrokerError(String),
ConfigError(String),
}Expand description
Error categories produced by the outbox crate.
The variants correspond to the layer that originated the failure. When a
caller needs to decide whether to retry, the variant is usually enough —
most transient conditions show up as InfrastructureError,
DatabaseError, or
BrokerError; configuration and deduplication issues
are terminal.
Variants§
InfrastructureError(String)
Failure from surrounding infrastructure that is not the primary database or broker (Redis, a notification channel, DNS, etc.). Usually transient.
DuplicateEvent
The event’s idempotency token has already been reserved by a prior
call. Returned by OutboxService::add_event
when IdempotencyStorageProvider::try_reserve
reports the token as taken. Not retryable.
DatabaseError(String)
Failure from the primary event store (for example SQL errors, pool exhaustion, serialization conflicts). Often retryable by the caller.
BrokerError(String)
Failure from the message transport (Kafka, Redis Streams, etc.) when publishing an event.
ConfigError(String)
Invalid or incomplete configuration discovered at wiring time —
typically raised by OutboxManagerBuilder::build
when a required collaborator is missing. Not retryable.
Trait Implementations§
Source§impl Clone for OutboxError
impl Clone for OutboxError
Source§fn clone(&self) -> OutboxError
fn clone(&self) -> OutboxError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutboxError
impl Debug for OutboxError
Source§impl Display for OutboxError
impl Display for OutboxError
Source§impl Error for OutboxError
impl Error for OutboxError
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()
Auto Trait Implementations§
impl Freeze for OutboxError
impl RefUnwindSafe for OutboxError
impl Send for OutboxError
impl Sync for OutboxError
impl Unpin for OutboxError
impl UnsafeUnpin for OutboxError
impl UnwindSafe for OutboxError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more