process_batch

Function process_batch 

Source
pub fn process_batch<I, F>(
    processor: &MarkdownProcessor,
    files: I,
    read_file_fn: F,
) -> Vec<(String, Result<MarkdownResult, String>)>
where I: Iterator<Item = PathBuf>, F: Fn(&Path) -> Result<String, Error>,
Expand description

Process a batch of markdown files with consistent error handling.

This function processes multiple markdown files using the same processor configuration, collecting results and handling errors gracefully.

§Arguments

  • processor - The configured markdown processor
  • files - Iterator of file paths to process
  • read_file_fn - Function to read file content from path

§Returns

Vector of tuples containing (file_path, processing_result)