#[non_exhaustive]pub enum PostgresInboxError {
NotMigrated {
source: Error,
},
NotClaimed {
scope: String,
message_id: MessageId,
},
InvalidSettings {
message: String,
},
Database {
source: Error,
},
}Expand description
A failure of a crate::PostgresInboxStore call (inbox contract §3). Deliberately smaller
than crate::PostgresOutboxError: the inbox has no enqueue/acquire analog, so it needs
no Decode/UnknownMetadataVersion/DuplicateMessage variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotMigrated
The relation does not resolve on this connection’s search_path (SQLSTATE 42P01).
Either migrate() has not run, or the connection’s search_path does not resolve the
unqualified name inbox to the migrated schema. Permanent — the table does not
appear on its own. Reliar does not check this at construction (ADR 0047); this is the
first statement reporting it, with PostgreSQL’s own message attached as the source.
Mapped from SQLSTATE 42P01 on every call.
Fields
source: ErrorThe underlying 42P01 error, returned from std::error::Error::source.
NotClaimed
crate::PostgresInboxStore’s InboxStore::complete matched zero rows — reachable only
by misuse (completing without a preceding Claimed claim, after the claiming
transaction aborted, or completing a row that has since gone dead — complete’s own
guard is completed_at IS NULL AND dead_at IS NULL, ADR 0042 A.2.4). Permanent —
retrying the same call changes nothing.
Fields
InvalidSettings
PostgresInboxSettings::validate rejected the settings — currently only
max_attempts == 0 (ADR 0042 A.2.4). Checked at
crate::PostgresInboxStore::with_settings, before any query runs. Permanent.
Database
Any other sqlx failure, classified by SQLSTATE exactly as
crate::PostgresOutboxError::Database.
Trait Implementations§
Source§impl Classify for PostgresInboxError
Per-variant classification table, exactly as crate::PostgresOutboxError’s: no blanket
“everything else is transient”.
impl Classify for PostgresInboxError
Per-variant classification table, exactly as crate::PostgresOutboxError’s: no blanket
“everything else is transient”.
Source§fn kind(&self) -> FailureKind
fn kind(&self) -> FailureKind
Source§impl Debug for PostgresInboxError
impl Debug for PostgresInboxError
Source§impl Display for PostgresInboxError
impl Display for PostgresInboxError
Source§impl Error for PostgresInboxError
impl Error for PostgresInboxError
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 !RefUnwindSafe for PostgresInboxError
impl !UnwindSafe for PostgresInboxError
impl Freeze for PostgresInboxError
impl Send for PostgresInboxError
impl Sync for PostgresInboxError
impl Unpin for PostgresInboxError
impl UnsafeUnpin for PostgresInboxError
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> 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