pub trait DataSource {
type Change;
// Required method
fn stream_changes<P: Into<PathBuf> + Send>(
&self,
db_path: P,
) -> impl Future<Output = Result<ChangeStream<Self::Change>, ResyError>> + Send;
}Expand description
Trait for data sources that can stream changes
This trait enables generic code to work with different data sources (S3, Snowflake, etc.) in a uniform way.
Required Associated Types§
Required Methods§
Sourcefn stream_changes<P: Into<PathBuf> + Send>(
&self,
db_path: P,
) -> impl Future<Output = Result<ChangeStream<Self::Change>, ResyError>> + Send
fn stream_changes<P: Into<PathBuf> + Send>( &self, db_path: P, ) -> impl Future<Output = Result<ChangeStream<Self::Change>, ResyError>> + Send
Stream changes from the data source, using the specified database path for state tracking.
If db_path is None, a default path will be generated based on the data source configuration.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.