pub trait StreamProvider:
Debug
+ Send
+ Sync {
// Required methods
fn schema(&self) -> &SchemaRef;
fn reader(&self) -> Result<Box<dyn RecordBatchReader>>;
fn stream_write_display(
&self,
t: DisplayFormatType,
f: &mut Formatter<'_>,
) -> Result;
// Provided method
fn writer(&self) -> Result<Box<dyn RecordBatchWriter>> { ... }
}Expand description
The StreamProvider trait is used as a generic interface for reading and writing from streaming
data sources (such as FIFO, Websocket, Kafka, etc.). Implementations of the provider are
responsible for providing a RecordBatchReader and optionally a RecordBatchWriter.
Required Methods§
Sourcefn stream_write_display(
&self,
t: DisplayFormatType,
f: &mut Formatter<'_>,
) -> Result
fn stream_write_display( &self, t: DisplayFormatType, f: &mut Formatter<'_>, ) -> Result
Display implementation when using as a DataSink