#[non_exhaustive]pub enum SqlErr {
UniqueConstraintViolation(String),
ForeignKeyConstraintViolation(String),
}
Expand description
An error from unsuccessful SQL query
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.
UniqueConstraintViolation(String)
Error for duplicate record in unique field or primary key field
ForeignKeyConstraintViolation(String)
Error for Foreign key constraint
Trait Implementations§
source§impl Error for SqlErr
impl Error for SqlErr
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl PartialEq for SqlErr
impl PartialEq for SqlErr
impl Eq for SqlErr
impl StructuralPartialEq for SqlErr
Auto Trait Implementations§
impl Freeze for SqlErr
impl RefUnwindSafe for SqlErr
impl Send for SqlErr
impl Sync for SqlErr
impl Unpin for SqlErr
impl UnwindSafe for SqlErr
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.