pub struct BinlogReader { /* private fields */ }Expand description
Reader for replaying events from a binlog file.
Implementations§
Source§impl BinlogReader
impl BinlogReader
Sourcepub fn open(path: impl Into<PathBuf>) -> Result<Self>
pub fn open(path: impl Into<PathBuf>) -> Result<Self>
Open an existing binlog file for reading.
Sourcepub fn read_after(&self, after_op_id: &str) -> Result<Vec<OpEvent>>
pub fn read_after(&self, after_op_id: &str) -> Result<Vec<OpEvent>>
Read events starting after a given op_id (for replay from a snapshot).
Sourcepub fn read_until(&self, until_op_id: &str) -> Result<Vec<OpEvent>>
pub fn read_until(&self, until_op_id: &str) -> Result<Vec<OpEvent>>
Read events up to and including a given op_id.
Sourcepub fn validate_lineage(&self) -> Result<Vec<String>>
pub fn validate_lineage(&self) -> Result<Vec<String>>
Validate the parent_id chain: each event’s parent_id should match the previous event’s op_id (except the first event).
Sourcepub fn validate_hash_chain(&self) -> Result<Vec<String>>
pub fn validate_hash_chain(&self) -> Result<Vec<String>>
Validate hash chain integrity (if events have event_hash/prev_event_hash).
Auto Trait Implementations§
impl Freeze for BinlogReader
impl RefUnwindSafe for BinlogReader
impl Send for BinlogReader
impl Sync for BinlogReader
impl Unpin for BinlogReader
impl UnsafeUnpin for BinlogReader
impl UnwindSafe for BinlogReader
Blanket Implementations§
impl<T> Allocation for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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