#[non_exhaustive]pub enum InfraErrorKind {
Connection,
Timeout,
Query,
DataCorruption,
Other,
}Expand description
Classification of infrastructure failures.
Used to distinguish retriable (Connection, Timeout) from non-retriable (Query, DataCorruption) infrastructure errors without string parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Connection
Network or pool connection failure (retriable).
Timeout
Operation timed out (retriable).
Query
Query or command failed (not retriable).
DataCorruption
Stored data is corrupt or unparsable.
Other
Uncategorised infrastructure error.
Implementations§
Source§impl InfraErrorKind
impl InfraErrorKind
Sourcepub fn is_retriable(self) -> bool
pub fn is_retriable(self) -> bool
Returns true for errors that are typically transient and worth retrying.
Trait Implementations§
Source§impl Clone for InfraErrorKind
impl Clone for InfraErrorKind
Source§fn clone(&self) -> InfraErrorKind
fn clone(&self) -> InfraErrorKind
Returns a duplicate of the value. Read more
1.0.0 · 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 InfraErrorKind
impl Debug for InfraErrorKind
Source§impl Display for InfraErrorKind
impl Display for InfraErrorKind
Source§impl PartialEq for InfraErrorKind
impl PartialEq for InfraErrorKind
impl Copy for InfraErrorKind
impl Eq for InfraErrorKind
impl StructuralPartialEq for InfraErrorKind
Auto Trait Implementations§
impl Freeze for InfraErrorKind
impl RefUnwindSafe for InfraErrorKind
impl Send for InfraErrorKind
impl Sync for InfraErrorKind
impl Unpin for InfraErrorKind
impl UnsafeUnpin for InfraErrorKind
impl UnwindSafe for InfraErrorKind
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.