Skip to main content

BatchSerializer

Trait BatchSerializer 

Source
pub trait BatchSerializer: Sync + Send {
    // Required method
    fn serialize(&self, batch: RecordBatch, initial: bool) -> Result<Bytes>;
}
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>

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).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§