Skip to main content

IpcRecordBatchSink

Trait IpcRecordBatchSink 

Source
trait IpcRecordBatchSink: IpcMessageSinkExt {
    // Provided method
    fn write_record_batch(
        &mut self,
        metadata: &[u8],
        encoded_buffers: &mut Vec<EncodedBuffer>,
        body_len: usize,
        write_options: &IpcWriteOptions,
    ) -> Result<(usize, usize), ArrowError> { ... }
}
Expand description

Optional hot-path hook for record batch messages.

Provided Methods§

Source

fn write_record_batch( &mut self, metadata: &[u8], encoded_buffers: &mut Vec<EncodedBuffer>, body_len: usize, write_options: &IpcWriteOptions, ) -> Result<(usize, usize), ArrowError>

Writes a record batch (or dictionary batch) message from its encoded metadata and body buffers.

metadata is the raw flatbuffer crate::Message (without continuation prefix), borrowed from the reused [FlatBufferBuilder]. The body buffers are already materialized as EncodedBuffer segments, allowing buffer output to preserve uncompressed Arrow buffers. They are drained out of encoded_buffers so the caller can reuse its allocation.

Each body buffer is padded to the alignment as it is written, so the body needs no trailing padding.

Returns the padded metadata length and body length written.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§