pub trait LazyBatchGenerator:
Send
+ Sync
+ Debug
+ Display {
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn generate_next_batch(
&mut self,
) -> Result<Option<RecordBatch>, DataFusionError>;
// Provided method
fn boundedness(&self) -> Boundedness { ... }
}Required Methods§
Sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Returns the generator as Any so that it can be
downcast to a specific implementation.
Sourcefn generate_next_batch(
&mut self,
) -> Result<Option<RecordBatch>, DataFusionError>
fn generate_next_batch( &mut self, ) -> Result<Option<RecordBatch>, DataFusionError>
Generate the next batch, return None when no more batches are available