pub struct RotateEvent {
pub position: u64,
pub next_filename: String,
}Expand description
Parsed ROTATE_EVENT (type 4).
Signals rotation to the next binary log file.
§Examples
use idb::binlog::header::RotateEvent;
use byteorder::{LittleEndian, ByteOrder};
let mut buf = vec![0u8; 24];
LittleEndian::write_u64(&mut buf[0..], 4); // position
buf[8..].copy_from_slice(b"mysql-bin.000002");
let re = RotateEvent::parse(&buf).unwrap();
assert_eq!(re.position, 4);
assert_eq!(re.next_filename, "mysql-bin.000002");Fields§
§position: u64Position in the next binlog file to start reading from.
next_filename: StringFilename of the next binlog file.
Implementations§
Trait Implementations§
Source§impl Clone for RotateEvent
impl Clone for RotateEvent
Source§fn clone(&self) -> RotateEvent
fn clone(&self) -> RotateEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RotateEvent
impl Debug for RotateEvent
Auto Trait Implementations§
impl Freeze for RotateEvent
impl RefUnwindSafe for RotateEvent
impl Send for RotateEvent
impl Sync for RotateEvent
impl Unpin for RotateEvent
impl UnsafeUnpin for RotateEvent
impl UnwindSafe for RotateEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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