pub trait TableSource: Send + Sync {
// Required method
fn fetch_new<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec: &'life1 TableSpec,
state: &'life2 TableState,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<RecordBatch>, TableState)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn cdc_capability(&self, table: &str) -> Option<CdcCapability> { ... }
}Expand description
A place rows come from.
Required Methods§
Sourcefn fetch_new<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec: &'life1 TableSpec,
state: &'life2 TableState,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<RecordBatch>, TableState)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch_new<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec: &'life1 TableSpec,
state: &'life2 TableState,
) -> Pin<Box<dyn Future<Output = Result<Option<(Vec<RecordBatch>, TableState)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Return rows new since state and the state to persist once they are
sunk, or None when nothing changed.
Provided Methods§
Sourcefn cdc_capability(&self, table: &str) -> Option<CdcCapability>
fn cdc_capability(&self, table: &str) -> Option<CdcCapability>
Which CDC backend this source resolved to for table, and why.
The listener stamps this onto the table’s TableState after every
changelog round, so the selection — and any fallback — is readable out
of state_json rather than only out of the log. None means the source
has no CDC story at all (the file source); it never means “unknown”.
Default: None, so an out-of-tree source keeps compiling.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".