pub trait CopySource: Send {
type DataReader<'a>: TableDataReader + 'a
where Self: 'a;
type Cleanup: AsyncCleanup;
// Required method
fn get_data<'a>(
&'a mut self,
schema: &'a PostgresSchema,
table: &'a PostgresTable,
data_format: &'a DataFormat,
) -> impl Future<Output = Result<TableData<Self::DataReader<'a>, Self::Cleanup>>> + 'a;
}Expand description
A copy source is something that can be used to read data from a source.
Required Associated Types§
Sourcetype DataReader<'a>: TableDataReader + 'a
where
Self: 'a
type DataReader<'a>: TableDataReader + 'a where Self: 'a
The type of the specific data reader provided when reading data
Sourcetype Cleanup: AsyncCleanup
type Cleanup: AsyncCleanup
The type of the cleanup that is returned when reading data. Can be () if no cleanup is needed.
Required Methods§
Sourcefn get_data<'a>(
&'a mut self,
schema: &'a PostgresSchema,
table: &'a PostgresTable,
data_format: &'a DataFormat,
) -> impl Future<Output = Result<TableData<Self::DataReader<'a>, Self::Cleanup>>> + 'a
fn get_data<'a>( &'a mut self, schema: &'a PostgresSchema, table: &'a PostgresTable, data_format: &'a DataFormat, ) -> impl Future<Output = Result<TableData<Self::DataReader<'a>, Self::Cleanup>>> + 'a
Should return a data-reader for the specified type in the specified format.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".