Skip to main content

RecordBatchWriter

Trait RecordBatchWriter 

Source
pub trait RecordBatchWriter {
    // Required methods
    fn write(&mut self, batch: &RecordBatch) -> Result<(), ArrowError>;
    fn close(self) -> Result<(), ArrowError>;
}
Expand description

Trait for types that can write RecordBatch’s.

Required Methods§

Source

fn write(&mut self, batch: &RecordBatch) -> Result<(), ArrowError>

Write a single batch to the writer.

Source

fn close(self) -> Result<(), ArrowError>

Write footer or termination data, then mark the writer as done.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<W> RecordBatchWriter for ArrowWriter<W>
where W: Write + Send,

Source§

fn write(&mut self, batch: &RecordBatch) -> Result<(), ArrowError>

Source§

fn close(self) -> Result<(), ArrowError>

Implementors§

Source§

impl<W, F> RecordBatchWriter for datafusion_python::datafusion_common::arrow::json::Writer<W, F>
where W: Write, F: JsonFormat,

Source§

impl<W> RecordBatchWriter for FileWriter<W>
where W: Write,

Source§

impl<W> RecordBatchWriter for StreamWriter<W>
where W: Write,

Source§

impl<W> RecordBatchWriter for datafusion_python::datafusion_common::arrow::csv::Writer<W>
where W: Write,