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§
Sourcefn source_name(&self) -> &'static str
fn source_name(&self) -> &'static str
Stable source identifier for diagnostics.
Sourcefn schema(&self) -> Result<SchemaRef>
fn schema(&self) -> Result<SchemaRef>
Return the source schema known before the source produces batches.
Sourcefn open(&self, context: BatchOpenContext) -> Result<Box<dyn BatchSource>>
fn open(&self, context: BatchOpenContext) -> Result<Box<dyn BatchSource>>
Open an independently owned source cursor.
Provided Methods§
Sourcefn source_limits(&self) -> Vec<SourceLimit>
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".