Skip to main content

BinlogEventType

Enum BinlogEventType 

Source
pub enum BinlogEventType {
Show 43 variants UnknownEvent, StartEventV3, QueryEvent, StopEvent, RotateEvent, IntvarEvent, LoadEvent, SlaveEvent, CreateFileEvent, AppendBlockEvent, ExecLoadEvent, DeleteFileEvent, NewLoadEvent, RandEvent, UserVarEvent, FormatDescription, XidEvent, BeginLoadQueryEvent, ExecuteLoadQueryEvent, TableMapEvent, PreGaWriteRowsEvent, PreGaUpdateRowsEvent, PreGaDeleteRowsEvent, WriteRowsEventV1, UpdateRowsEventV1, DeleteRowsEventV1, IncidentEvent, HeartbeatEvent, IgnorableLogEvent, RowsQueryEvent, WriteRowsEvent, UpdateRowsEvent, DeleteRowsEvent, GtidLogEvent, AnonymousGtidLogEvent, PreviousGtidsLogEvent, TransactionContextEvent, ViewChangeEvent, XaPrepareLogEvent, PartialUpdateRowsEvent, TransactionPayloadEvent, HeartbeatEventV2, Unknown(u8),
}
Expand description

MySQL binary log event type codes.

Covers all event types from MySQL 5.0 through 9.x (42 named variants). Unrecognized type codes are preserved in the Unknown(u8) variant for forward compatibility.

§Examples

use idb::binlog::BinlogEventType;

let t = BinlogEventType::from_u8(15);
assert_eq!(t, BinlogEventType::FormatDescription);
assert_eq!(t.name(), "FORMAT_DESCRIPTION");

let u = BinlogEventType::from_u8(200);
assert!(matches!(u, BinlogEventType::Unknown(200)));

Variants§

§

UnknownEvent

Unknown or invalid event (type code 0).

§

StartEventV3

Start event v3 (pre-v4 format).

§

QueryEvent

SQL query event.

§

StopEvent

Server shutdown.

§

RotateEvent

Binlog file rotation.

§

IntvarEvent

Integer session variable.

§

LoadEvent

LOAD DATA INFILE event (deprecated).

§

SlaveEvent

Slave event (internal replication, deprecated).

§

CreateFileEvent

Create file for LOAD DATA (deprecated).

§

AppendBlockEvent

Append block for LOAD DATA (deprecated).

§

ExecLoadEvent

Execute LOAD DATA (deprecated).

§

DeleteFileEvent

Delete file for LOAD DATA (deprecated).

§

NewLoadEvent

New LOAD DATA INFILE event (deprecated).

§

RandEvent

Random seed for RAND().

§

UserVarEvent

User-defined variable.

§

FormatDescription

Format description event (binlog v4 header).

§

XidEvent

XA transaction commit.

§

BeginLoadQueryEvent

Begin LOAD QUERY event.

§

ExecuteLoadQueryEvent

Execute LOAD QUERY event.

§

TableMapEvent

Table map (row-based replication).

§

PreGaWriteRowsEvent

Pre-GA write rows event.

§

PreGaUpdateRowsEvent

Pre-GA update rows event.

§

PreGaDeleteRowsEvent

Pre-GA delete rows event.

§

WriteRowsEventV1

Write rows v1.

§

UpdateRowsEventV1

Update rows v1.

§

DeleteRowsEventV1

Delete rows v1.

§

IncidentEvent

Incident event.

§

HeartbeatEvent

Heartbeat event.

§

IgnorableLogEvent

Ignorable log event.

§

RowsQueryEvent

Rows query event.

§

WriteRowsEvent

Write rows v2.

§

UpdateRowsEvent

Update rows v2.

§

DeleteRowsEvent

Delete rows v2.

§

GtidLogEvent

GTID event.

§

AnonymousGtidLogEvent

Anonymous GTID event.

§

PreviousGtidsLogEvent

Previous GTIDs event.

§

TransactionContextEvent

Transaction context event (Group Replication).

§

ViewChangeEvent

View change event (Group Replication).

§

XaPrepareLogEvent

XA prepare log event.

§

PartialUpdateRowsEvent

Partial update rows event (MySQL 8.0+).

§

TransactionPayloadEvent

Transaction payload event (MySQL 8.0.20+).

§

HeartbeatEventV2

Heartbeat v2 event (MySQL 8.0.26+).

§

Unknown(u8)

Unrecognized event type code (forward compatibility).

Implementations§

Source§

impl BinlogEventType

Source

pub fn from_u8(code: u8) -> Self

Map a raw type code byte to a BinlogEventType variant.

Source

pub fn type_code(&self) -> u8

Return the raw type code byte.

Source

pub fn name(&self) -> &'static str

Returns the MySQL source-style name for this event type.

Trait Implementations§

Source§

impl Clone for BinlogEventType

Source§

fn clone(&self) -> BinlogEventType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BinlogEventType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for BinlogEventType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for BinlogEventType

Source§

fn eq(&self, other: &BinlogEventType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for BinlogEventType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for BinlogEventType

Source§

impl Eq for BinlogEventType

Source§

impl StructuralPartialEq for BinlogEventType

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V