Enum EventData

Source
pub enum EventData {
    EventHeader {
        timestamp: u32,
        event_type: TypeCode,
        server_id: u32,
        event_size: u32,
        log_pos: u32,
        flags: u16,
    },
    XIDEvent {
        xid: u64,
    },
    RotateEvent {
        pos: u64,
        next_log_name: String,
    },
    GtidLogEvent {
        flags: u8,
        uuid: Uuid,
        coordinate: u64,
        last_committed: Option<u64>,
        sequence_number: Option<u64>,
    },
    QueryEvent {
        thread_id: u32,
        exec_time: u32,
        error_code: i16,
        schema: String,
        query: String,
    },
    FormatDescriptionEvent {
        binlog_version: u16,
        server_version: String,
        create_timestamp: u32,
        common_header_len: u8,
        checksum_algorithm: ChecksumAlgorithm,
    },
    TableMapEvent {
        table_id: u64,
        schema_name: String,
        table_name: String,
        columns: Vec<ColumnType>,
        null_bitmap: BitSet,
    },
    WriteRowsEvent {
        table_id: u64,
        rows: Vec<RowEvent>,
    },
    UpdateRowsEvent {
        table_id: u64,
        rows: Vec<RowEvent>,
    },
    DeleteRowsEvent {
        table_id: u64,
        rows: Vec<RowEvent>,
    },
}

Variants§

§

EventHeader

Fields

§timestamp: u32
§event_type: TypeCode
§server_id: u32
§event_size: u32
§log_pos: u32
§flags: u16
§

XIDEvent

Fields

§xid: u64
§

RotateEvent

Fields

§pos: u64
§next_log_name: String
§

GtidLogEvent

Fields

§flags: u8
§uuid: Uuid
§coordinate: u64
§last_committed: Option<u64>
§sequence_number: Option<u64>
§

QueryEvent

Fields

§thread_id: u32
§exec_time: u32
§error_code: i16
§schema: String
§query: String
§

FormatDescriptionEvent

Fields

§binlog_version: u16
§server_version: String
§create_timestamp: u32
§common_header_len: u8
§checksum_algorithm: ChecksumAlgorithm
§

TableMapEvent

Fields

§table_id: u64
§schema_name: String
§table_name: String
§columns: Vec<ColumnType>
§null_bitmap: BitSet
§

WriteRowsEvent

Fields

§table_id: u64
§

UpdateRowsEvent

Fields

§table_id: u64
§

DeleteRowsEvent

Fields

§table_id: u64

Implementations§

Source§

impl EventData

Source

pub fn parse_header(data: &[u8]) -> Result<Option<EventData>, EventParseError>

Source

pub fn from_data( type_code: TypeCode, data: &[u8], table_map: Option<&TableMap>, ) -> Result<Option<Self>, EventParseError>

Trait Implementations§

Source§

impl Debug for EventData

Source§

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

Formats the value using the given formatter. Read more

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> 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 = 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