pub enum ReplicationEvent {
KeepAlive {
wal_end: Lsn,
reply_requested: bool,
server_time_micros: i64,
},
Begin {
final_lsn: Lsn,
xid: u32,
commit_time_micros: i64,
},
XLogData {
wal_start: Lsn,
wal_end: Lsn,
server_time_micros: i64,
data: Bytes,
},
Commit {
lsn: Lsn,
end_lsn: Lsn,
commit_time_micros: i64,
},
Message {
transactional: bool,
lsn: Lsn,
prefix: String,
content: Bytes,
},
StoppedAt {
reached: Lsn,
},
}Expand description
Re-export so downstream modules (stream.rs, Task 9) can import the event
type without depending on pgwire_replication directly.
Events emitted by the replication worker.
Variants§
KeepAlive
Server heartbeat message.
Fields
Begin
Start of a transaction (pgoutput Begin message).
XLogData
WAL data containing transaction changes.
Fields
Commit
End of a transaction (pgoutput Commit message).
Message
Logical decoding message emitted via pg_logical_emit_message().
Transactional messages are delivered only after the enclosing transaction commits. Non-transactional messages are delivered immediately.
Fields
StoppedAt
Emitted when stop_at_lsn has been reached.
After this event, no more events will be emitted and the replication stream will be closed.
Trait Implementations§
Source§impl Clone for ReplicationEvent
impl Clone for ReplicationEvent
Source§fn clone(&self) -> ReplicationEvent
fn clone(&self) -> ReplicationEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for ReplicationEvent
impl RefUnwindSafe for ReplicationEvent
impl Send for ReplicationEvent
impl Sync for ReplicationEvent
impl Unpin for ReplicationEvent
impl UnsafeUnpin for ReplicationEvent
impl UnwindSafe for ReplicationEvent
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> 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