Trait parquet::record::RecordWriter

source ·
pub trait RecordWriter<T> {
    // Required methods
    fn write_to_row_group<W: Write + Send>(
        &self,
        row_group_writer: &mut SerializedRowGroupWriter<'_, W>,
    ) -> Result<(), ParquetError>;
    fn schema(&self) -> Result<TypePtr, ParquetError>;
}
Expand description

Trait describing how to write a record (the implementator) to a row group writer.

parquet_derive crate provides a derive macro ParquetRecordWriter for this trait for unnested structs.

The type parameter T is used to work around the rust orphan rule when implementing on types such as &[T].

Required Methods§

source

fn write_to_row_group<W: Write + Send>( &self, row_group_writer: &mut SerializedRowGroupWriter<'_, W>, ) -> Result<(), ParquetError>

Writes from self into row_group_writer.

source

fn schema(&self) -> Result<TypePtr, ParquetError>

Generated schema used by row_group_writer

Object Safety§

This trait is not object safe.

Implementors§