BatchSerializer

Trait BatchSerializer 

Source
pub trait BatchSerializer: Sync + Send {
    // Required method
    fn serialize(
        &self,
        batch: RecordBatch,
        initial: bool,
    ) -> Result<Bytes, DataFusionError>;
}
Expand description

A trait that defines the methods required for a RecordBatch serializer.

Required Methods§

Source

fn serialize( &self, batch: RecordBatch, initial: bool, ) -> Result<Bytes, DataFusionError>

Asynchronously serializes a RecordBatch and returns the serialized bytes. Parameter initial signals whether the given batch is the first batch. This distinction is important for certain serializers (like CSV).

Implementors§