Skip to main content

CopySource

Trait CopySource 

Source
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§

Source

type DataReader<'a>: TableDataReader + 'a where Self: 'a

The type of the specific data reader provided when reading data

Source

type Cleanup: AsyncCleanup

The type of the cleanup that is returned when reading data. Can be () if no cleanup is needed.

Required Methods§

Source

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".

Implementors§