Skip to main content

CdcStream

Trait CdcStream 

Source
pub trait CdcStream: Send {
    // Required methods
    fn deliver(&mut self, batch: &CdcBatch) -> Result<(), FnError>;
    fn checkpoint(&mut self) -> Result<CdcLsn, FnError>;
    fn shutdown(&mut self) -> Result<(), FnError>;
}
Expand description

A live CDC sink instance.

Required Methods§

Source

fn deliver(&mut self, batch: &CdcBatch) -> Result<(), FnError>

Deliver a batch to the sink.

§Errors

Returns FnError on delivery failure (network error, queue full).

Source

fn checkpoint(&mut self) -> Result<CdcLsn, FnError>

Acknowledge progress — host advances retention to this LSN.

§Errors

Returns FnError if the checkpoint cannot be persisted.

Source

fn shutdown(&mut self) -> Result<(), FnError>

Gracefully shut down the sink.

§Errors

Returns FnError if shutdown fails (network errors, etc.).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§