Skip to main content

Event

Enum Event 

Source
pub enum Event<'a> {
Show 16 variants Progress, UpgradeTls, Connected { connection_id: u32, }, RsaSeedNeeded, AuthFastSuccess, AuthFull, ColumnCount { token: Token, count: usize, }, Column { token: Token, column: Column<'a>, parameter: bool, }, Row { token: Token, row: Row<'a>, }, Ok { token: Token, packet: OkPacket<'a>, }, Eof { token: Token, warnings: u16, status: StatusFlags, }, Prepared { token: Token, statement: Statement, }, Error { token: Option<Token>, error: ServerError<'a>, }, LocalInfile { token: Token, file_name: &'a [u8], }, Completed { token: Token, outcome: Outcome, }, Closed { reason: Error, },
}

Variants§

§

Progress

§

UpgradeTls

§

Connected

Fields

§connection_id: u32
§

RsaSeedNeeded

Supply 20 fresh random bytes to rsa_seed; no entropy is read by the core.

§

AuthFastSuccess

§

AuthFull

§

ColumnCount

Fields

§token: Token
§count: usize
§

Column

Fields

§token: Token
§column: Column<'a>
§parameter: bool
§

Row

Fields

§token: Token
§row: Row<'a>
§

Ok

A genuine OK packet: a command or one statement of a multi-statement query finished without a result set. affected_rows, last_insert_id and info are meaningful.

Fields

§token: Token
§packet: OkPacket<'a>
§

Eof

The EOF packet ending one result set’s rows. It carries no row counts, only the warning count and status flags (SERVER_MORE_RESULTS_EXISTS announces another result).

Fields

§token: Token
§warnings: u16
§

Prepared

Fields

§token: Token
§statement: Statement
§

Error

Fields

§token: Option<Token>
§error: ServerError<'a>
§

LocalInfile

Fields

§token: Token
§file_name: &'a [u8]
§

Completed

Fields

§token: Token
§outcome: Outcome
§

Closed

Fields

§reason: Error

Trait Implementations§

Source§

impl<'a> Debug for Event<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for Event<'a>

§

impl<'a> Freeze for Event<'a>

§

impl<'a> RefUnwindSafe for Event<'a>

§

impl<'a> Send for Event<'a>

§

impl<'a> Sync for Event<'a>

§

impl<'a> Unpin for Event<'a>

§

impl<'a> UnsafeUnpin for Event<'a>

§

impl<'a> UnwindSafe for Event<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.