[][src]Enum mysql_common::packets::ErrPacket

pub enum ErrPacket<'a> {
    Error(u16[u8; 5]Cow<'a, [u8]>),
    Progress(ProgressReport<'a>),
}

MySql error packet.

May hold an error or a progress report.

Variants

Error(u16[u8; 5]Cow<'a, [u8]>)

(, , )

Progress(ProgressReport<'a>)

Methods

impl<'a> ErrPacket<'a>[src]

pub fn is_error(&self) -> bool[src]

Returns false if this error packet contains progress report.

pub fn is_progress_report(&self) -> bool[src]

Returns true if this error packet contains progress report.

pub fn progress_report(&self) -> &ProgressReport[src]

Will panic if ErrPacket does not contains progress report

pub fn error_code(&self) -> u16[src]

Will panic if ErrPacket contains progress report

pub fn sql_state_ref(&self) -> &[u8; 5][src]

Will panic if ErrPacket contains progress report

pub fn sql_state_str(&self) -> Cow<str>[src]

Will panic if ErrPacket contains progress report

pub fn message_ref(&self) -> &[u8][src]

Will panic if ErrPacket contains progress report

pub fn message_str(&self) -> Cow<str>[src]

Will panic if ErrPacket contains progress report

pub fn into_owned(self) -> ErrPacket<'static>[src]

Trait Implementations

impl<'a> PartialEq<ErrPacket<'a>> for ErrPacket<'a>[src]

impl<'a> Clone for ErrPacket<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Display for ErrPacket<'a>[src]

impl<'a> Debug for ErrPacket<'a>[src]

Auto Trait Implementations

impl<'a> Send for ErrPacket<'a>

impl<'a> Sync for ErrPacket<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self