parquet::record::record_writer

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§