pub struct QueryError {
pub kind: QueryErrorKind,
pub sql: Option<String>,
pub sqlstate: Option<String>,
pub message: String,
pub detail: Option<String>,
pub hint: Option<String>,
pub position: Option<usize>,
pub source: Option<Box<dyn Error + Send + Sync>>,
}Fields§
§kind: QueryErrorKind§sql: Option<String>§sqlstate: Option<String>§message: String§detail: Option<String>§hint: Option<String>§position: Option<usize>§source: Option<Box<dyn Error + Send + Sync>>Implementations§
Source§impl QueryError
impl QueryError
Sourcepub fn is_unique_violation(&self) -> bool
pub fn is_unique_violation(&self) -> bool
Is this a unique constraint violation?
Sourcepub fn is_foreign_key_violation(&self) -> bool
pub fn is_foreign_key_violation(&self) -> bool
Is this a foreign key violation?
Trait Implementations§
Source§impl Debug for QueryError
impl Debug for QueryError
Source§impl Display for QueryError
impl Display for QueryError
Source§impl From<QueryError> for Error
impl From<QueryError> for Error
Source§fn from(err: QueryError) -> Self
fn from(err: QueryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QueryError
impl !RefUnwindSafe for QueryError
impl Send for QueryError
impl Sync for QueryError
impl Unpin for QueryError
impl !UnwindSafe for QueryError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).