Skip to main content

process_batch

Function process_batch 

Source
pub fn process_batch<F>(
    src_dir: &Path,
    dst_dir: &Path,
    processor: F,
) -> Result<BatchResult>
where F: Fn(&Path, &Path) -> Result<u64>,
Expand description

Processes a batch of files through a streaming pipeline.

Applies processor to each file in src_dir, writing results to dst_dir. Processes files sequentially with constant memory. For parallel processing, use process_batch_parallel.

ยงErrors

Returns an error if any file cannot be read, processed, or written. Processing stops at the first error.