Skip to main content

EventStream

Trait EventStream 

Source
pub trait EventStream: Send {
    // Required methods
    fn next_event(&mut self) -> impl Future<Output = Result<SourceEvent>> + Send;
    fn send_feedback(
        &mut self,
        fb: Feedback,
    ) -> impl Future<Output = Result<()>> + Send;
}
Expand description

An open logical replication stream.

Required Methods§

Source

fn next_event(&mut self) -> impl Future<Output = Result<SourceEvent>> + Send

Next event in commit order. Must be cancel-safe: dropping the future must not lose or corrupt a partially received message.

Source

fn send_feedback( &mut self, fb: Feedback, ) -> impl Future<Output = Result<()>> + Send

Report progress to the server. Only positions that are durable in the target may be reported as flushed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§