pub trait BatchSource: Send {
// Required methods
fn schema(&self) -> SchemaRef;
fn next_batch(&mut self) -> Result<Option<StreamBatch>>;
// Provided method
fn close(&mut self) -> Result<()> { ... }
}Expand description
Incremental batch source and stream contracts. Owned incremental reader for one logical source execution.
Required Methods§
Sourcefn next_batch(&mut self) -> Result<Option<StreamBatch>>
fn next_batch(&mut self) -> Result<Option<StreamBatch>>
Produce at most one reserved batch. None denotes normal end-of-stream.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".