pub struct ErrPacket {
pub error_code: u16,
pub sql_state: String,
pub error_message: String,
}Expand description
Parsed Error packet.
Fields§
§error_code: u16Error code
sql_state: StringSQL state (5 characters)
error_message: StringError message
Implementations§
Source§impl ErrPacket
impl ErrPacket
Sourcepub fn is_duplicate_key(&self) -> bool
pub fn is_duplicate_key(&self) -> bool
Check if this is a unique constraint violation.
Sourcepub fn is_foreign_key_violation(&self) -> bool
pub fn is_foreign_key_violation(&self) -> bool
Check if this is a foreign key constraint violation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrPacket
impl RefUnwindSafe for ErrPacket
impl Send for ErrPacket
impl Sync for ErrPacket
impl Unpin for ErrPacket
impl UnwindSafe for ErrPacket
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<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).