#[non_exhaustive]pub enum RelError {
UniqueViolation {
constraint: Option<String>,
},
ForeignKeyViolation {
constraint: Option<String>,
},
CheckViolation {
constraint: Option<String>,
},
Serialization,
Deadlock,
Unavailable(String),
Unsupported(String),
Backend(String),
}Expand description
Why a relational operation failed, classified so a caller can branch without parsing driver text (Humboldt hand-maps constraint names in at least seven places today). Plain data.
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.
UniqueViolation
A unique or primary-key constraint rejected the statement.
ForeignKeyViolation
A foreign-key constraint rejected the statement.
CheckViolation
A check constraint (or NOT NULL) rejected the statement.
Serialization
The transaction could not be serialised; retrying it may succeed.
Deadlock
The server chose this transaction as a deadlock victim; retrying it may succeed.
The server could not be reached or went away.
Unsupported(String)
The backend cannot do this, and says so rather than approximating.
Backend(String)
Any other failure; the text is the driver’s.
Trait Implementations§
impl Eq for RelError
Source§impl Error for RelError
impl Error for RelError
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()
impl StructuralPartialEq for RelError
Auto Trait Implementations§
impl Freeze for RelError
impl RefUnwindSafe for RelError
impl Send for RelError
impl Sync for RelError
impl Unpin for RelError
impl UnsafeUnpin for RelError
impl UnwindSafe for RelError
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