pub trait BatchSerializer: Sync + Send { // Required method fn serialize(&self, batch: RecordBatch, initial: bool) -> Result<Bytes>; }
A trait that defines the methods required for a RecordBatch serializer.
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).
RecordBatch
initial