Skip to main content

StreamFactory

Trait StreamFactory 

Source
pub trait StreamFactory: Send {
    type Stream: EventStream;

    // Required method
    fn connect(
        &mut self,
        cp: &Checkpoint,
    ) -> impl Future<Output = Result<(Self::Stream, Lsn)>> + Send;
}
Expand description

Produces streams; called again after a transient failure.

Required Associated Types§

Required Methods§

Source

fn connect( &mut self, cp: &Checkpoint, ) -> impl Future<Output = Result<(Self::Stream, Lsn)>> + Send

Open a stream resuming from cp.committed_lsn (the server may start later, at its confirmed flush position). Implementations verify source identity and slot continuity against cp and fail with ResyncRequired when continuity cannot be proven. Returns the stream and the server’s current WAL end.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§