Skip to main content

FormatBatchProcessor

Trait FormatBatchProcessor 

Source
pub trait FormatBatchProcessor {
    // Required methods
    fn format_kind(&self) -> FormatKind;
    fn process_batch(
        &mut self,
        data: &[u8],
        schema: &CompiledSchema,
    ) -> Result<FormatBatchResult>;
    fn process_batch_unfiltered(
        &mut self,
        data: &[u8],
    ) -> Result<FormatBatchResult>;
    fn reset(&mut self);
}
Expand description

Trait for format-specific batch processors (legacy string-based API)

Implementations provide SIMD-accelerated batch processing for their format, with schema-aware filtering during the parsing phase.

Note: For new code, prefer implementing TapeBatchProcessor which preserves format-specific information for lossless round-trips.

Required Methods§

Source

fn format_kind(&self) -> FormatKind

Get the format kind this processor handles

Source

fn process_batch( &mut self, data: &[u8], schema: &CompiledSchema, ) -> Result<FormatBatchResult>

Process a batch of data with schema filtering

§Arguments
  • data - Raw bytes in the format’s encoding
  • schema - Compiled schema for filtering
§Errors

Returns an error if batch processing fundamentally fails

Source

fn process_batch_unfiltered(&mut self, data: &[u8]) -> Result<FormatBatchResult>

Process a batch without schema filtering (all fields included)

§Arguments
  • data - Raw bytes in the format’s encoding
§Errors

Returns an error if batch processing fundamentally fails

Source

fn reset(&mut self)

Reset processor state for a new batch

Implementors§