Enum mysql_common::packets::ErrPacket
source · Expand description
MySql error packet.
May hold an error or a progress report.
Variants
Error(u16, [u8; 5], Cow<'a, [u8]>)
(
Progress(ProgressReport<'a>)
Implementations
sourceimpl<'a> ErrPacket<'a>
impl<'a> ErrPacket<'a>
sourcepub fn is_progress_report(&self) -> bool
pub fn is_progress_report(&self) -> bool
Returns true if this error packet contains progress report.
sourcepub fn progress_report(&self) -> &ProgressReport<'_>
pub fn progress_report(&self) -> &ProgressReport<'_>
Will panic if ErrPacket does not contains progress report
sourcepub fn error_code(&self) -> u16
pub fn error_code(&self) -> u16
Will panic if ErrPacket contains progress report
sourcepub fn sql_state_ref(&self) -> &[u8; 5]
pub fn sql_state_ref(&self) -> &[u8; 5]
Will panic if ErrPacket contains progress report
sourcepub fn sql_state_str(&self) -> Cow<'_, str>
pub fn sql_state_str(&self) -> Cow<'_, str>
Will panic if ErrPacket contains progress report
sourcepub fn message_ref(&self) -> &[u8]ⓘ
pub fn message_ref(&self) -> &[u8]ⓘ
Will panic if ErrPacket contains progress report
sourcepub fn message_str(&self) -> Cow<'_, str>
pub fn message_str(&self) -> Cow<'_, str>
Will panic if ErrPacket contains progress report
pub fn into_owned(self) -> ErrPacket<'static>
Trait Implementations
sourceimpl<'a> PartialEq<ErrPacket<'a>> for ErrPacket<'a>
impl<'a> PartialEq<ErrPacket<'a>> for ErrPacket<'a>
impl<'a> StructuralPartialEq for ErrPacket<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ErrPacket<'a>
impl<'a> Send for ErrPacket<'a>
impl<'a> Sync for ErrPacket<'a>
impl<'a> Unpin for ErrPacket<'a>
impl<'a> UnwindSafe for ErrPacket<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more