Skip to main content

BatchSourceFactory

Trait BatchSourceFactory 

Source
pub trait BatchSourceFactory {
    // Required methods
    fn source_name(&self) -> &'static str;
    fn schema(&self) -> Result<SchemaRef>;
    fn open(&self, context: BatchOpenContext) -> Result<Box<dyn BatchSource>>;

    // Provided method
    fn source_limits(&self) -> Vec<SourceLimit> { ... }
}
Expand description

Incremental batch source and stream contracts. Re-consumable factory for a source; a factory must not perform source I/O until open.

Required Methods§

Source

fn source_name(&self) -> &'static str

Stable source identifier for diagnostics.

Source

fn schema(&self) -> Result<SchemaRef>

Return the source schema known before the source produces batches.

Source

fn open(&self, context: BatchOpenContext) -> Result<Box<dyn BatchSource>>

Open an independently owned source cursor.

Provided Methods§

Source

fn source_limits(&self) -> Vec<SourceLimit>

Return static capability limitations visible before opening the source.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§