Trait connectorx::typesystem::Transport

source ·
pub trait Transport {
    type TSS: TypeSystem;
    type TSD: TypeSystem;
    type S: Source;
    type D: Destination;
    type Error: From<ConnectorXError> + From<<Self::S as Source>::Error> + From<<Self::D as Destination>::Error> + Send + Debug;

    // Required methods
    fn convert_typesystem(ts: Self::TSS) -> CXResult<Self::TSD>;
    fn process<'s, 'd, 'r>(
        ts1: Self::TSS,
        ts2: Self::TSD,
        src: &'r mut <<Self::S as Source>::Partition as SourcePartition>::Parser<'s>,
        dst: &'r mut <Self::D as Destination>::Partition<'d>
    ) -> Result<(), Self::Error>
       where Self: 'd;
    fn processor<'s, 'd>(
        ts1: Self::TSS,
        ts2: Self::TSD
    ) -> CXResult<fn(src: &mut <<Self::S as Source>::Partition as SourcePartition>::Parser<'s>, dst: &mut <Self::D as Destination>::Partition<'d>) -> Result<(), Self::Error>>
       where Self: 'd;

    // Provided method
    fn convert_type<T1, T2>(val: T1) -> T2
       where Self: TypeConversion<T1, T2> { ... }
}
Expand description

Transport asks the source to produce a value, do type conversion and then write the value to a destination. Do not manually implement this trait for types. Use [impl_transport!] to create a struct that implements this trait instead.

Required Associated Types§

source

type TSS: TypeSystem

source

type TSD: TypeSystem

source

type S: Source

source

type D: Destination

source

type Error: From<ConnectorXError> + From<<Self::S as Source>::Error> + From<<Self::D as Destination>::Error> + Send + Debug

Required Methods§

source

fn convert_typesystem(ts: Self::TSS) -> CXResult<Self::TSD>

convert_typesystem convert the source type system TSS to the destination type system TSD.

source

fn process<'s, 'd, 'r>( ts1: Self::TSS, ts2: Self::TSD, src: &'r mut <<Self::S as Source>::Partition as SourcePartition>::Parser<'s>, dst: &'r mut <Self::D as Destination>::Partition<'d> ) -> Result<(), Self::Error>
where Self: 'd,

process will ask source to produce a value with type T1, based on TSS, and then do type conversion using convert_type to get value with type T2, which is associated to TSD. Finally, it will write the value with type T2 to the destination.

source

fn processor<'s, 'd>( ts1: Self::TSS, ts2: Self::TSD ) -> CXResult<fn(src: &mut <<Self::S as Source>::Partition as SourcePartition>::Parser<'s>, dst: &mut <Self::D as Destination>::Partition<'d>) -> Result<(), Self::Error>>
where Self: 'd,

Provided Methods§

source

fn convert_type<T1, T2>(val: T1) -> T2
where Self: TypeConversion<T1, T2>,

convert_type convert the type T1 associated with the source type system TSS to a type T2 which is associated with the destination type system TSD.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'tp> Transport for BigQueryArrow2Transport

source§

impl<'tp> Transport for connectorx::transports::BigQueryArrowStreamTransport

source§

impl<'tp> Transport for connectorx::transports::BigQueryArrowTransport

source§

impl<'tp> Transport for CSVArrowTransport

§

type TSS = CSVTypeSystem

§

type TSD = ArrowTypeSystem

§

type S = CSVSource

§

type D = ArrowDestination

§

type Error = CSVArrowTransportError

source§

impl<'tp> Transport for DummyArrow2Transport

§

type TSS = DummyTypeSystem

§

type TSD = Arrow2TypeSystem

§

type S = DummySource

§

type D = Arrow2Destination

§

type Error = DummyArrow2TransportError

source§

impl<'tp> Transport for DummyArrowTransport

§

type TSS = DummyTypeSystem

§

type TSD = ArrowTypeSystem

§

type S = DummySource

§

type D = ArrowDestination

§

type Error = DummyArrowTransportError

source§

impl<'tp> Transport for MsSQLArrow2Transport

source§

impl<'tp> Transport for connectorx::transports::MsSQLArrowStreamTransport

source§

impl<'tp> Transport for connectorx::transports::MsSQLArrowTransport

source§

impl<'tp> Transport for MySQLArrow2Transport<BinaryProtocol>

source§

impl<'tp> Transport for MySQLArrow2Transport<TextProtocol>

source§

impl<'tp> Transport for connectorx::transports::MySQLArrowStreamTransport<BinaryProtocol>

source§

impl<'tp> Transport for connectorx::transports::MySQLArrowStreamTransport<TextProtocol>

source§

impl<'tp> Transport for connectorx::transports::MySQLArrowTransport<BinaryProtocol>

source§

impl<'tp> Transport for connectorx::transports::MySQLArrowTransport<TextProtocol>

source§

impl<'tp> Transport for OracleArrow2Transport

source§

impl<'tp> Transport for connectorx::transports::OracleArrowStreamTransport

source§

impl<'tp> Transport for connectorx::transports::OracleArrowTransport

source§

impl<'tp> Transport for PostgresArrow2Transport<BinaryProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for PostgresArrow2Transport<BinaryProtocol, NoTls>

source§

impl<'tp> Transport for PostgresArrow2Transport<CSVProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for PostgresArrow2Transport<CSVProtocol, NoTls>

source§

impl<'tp> Transport for PostgresArrow2Transport<CursorProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for PostgresArrow2Transport<CursorProtocol, NoTls>

source§

impl<'tp> Transport for PostgresArrow2Transport<SimpleProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for PostgresArrow2Transport<SimpleProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<BinaryProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<BinaryProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<CSVProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<CSVProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<CursorProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<CursorProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<SimpleProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowStreamTransport<SimpleProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<BinaryProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<BinaryProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<CSVProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<CSVProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<CursorProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<CursorProtocol, NoTls>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<SimpleProtocol, MakeTlsConnector>

source§

impl<'tp> Transport for connectorx::transports::PostgresArrowTransport<SimpleProtocol, NoTls>

source§

impl<'tp> Transport for SQLiteArrow2Transport

source§

impl<'tp> Transport for connectorx::transports::SQLiteArrowStreamTransport

source§

impl<'tp> Transport for connectorx::transports::SQLiteArrowTransport

source§

impl<'tp> Transport for TrinoArrow2Transport

source§

impl<'tp> Transport for connectorx::transports::TrinoArrowStreamTransport

source§

impl<'tp> Transport for connectorx::transports::TrinoArrowTransport