Skip to main content

LookupSourceFactory

Trait LookupSourceFactory 

Source
pub trait LookupSourceFactory: Send + Sync {
    // Required method
    fn build<'life0, 'async_trait>(
        &'life0 self,
        config: ConnectorConfig,
        declared_schema: Option<SchemaRef>,
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn LookupSourceDyn>, ConnectorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn resolve_schema<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 ConnectorConfig,
        explicit: Option<SchemaRef>,
    ) -> Pin<Box<dyn Future<Output = Result<SchemaBinding, ConnectorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Factory for constructing a lookup source (async, for on-demand mode).

Required Methods§

Source

fn build<'life0, 'async_trait>( &'life0 self, config: ConnectorConfig, declared_schema: Option<SchemaRef>, ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn LookupSourceDyn>, ConnectorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Build a lookup source instance from the given config.

declared_schema is the table’s declared Arrow schema, when known. Schema-bearing sources may derive their own; schemaless sources use it to project records into typed columns.

Provided Methods§

Source

fn resolve_schema<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 ConnectorConfig, explicit: Option<SchemaRef>, ) -> Pin<Box<dyn Future<Output = Result<SchemaBinding, ConnectorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a lookup reader before opening its cache-miss data path.

§Errors

The default requires explicit fields. Custom metadata-capable factories override this hook without consuming data or creating external resources.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§