pub fn process_batch(
document_root: &Path,
requests: &[BatchRequest],
workers: usize,
) -> Vec<BatchResult>Available on crate feature
batch only.Expand description
Concurrently reads multiple files under a shared root.
§Examples
use http_handle::batch::{BatchRequest, process_batch};
use std::path::{Path, PathBuf};
let requests = vec![BatchRequest { relative_path: PathBuf::from("index.html") }];
let _results = process_batch(Path::new("."), &requests, 2);§Errors
This function does not return a Result. Per-file errors are captured in each
BatchResult::body entry.
§Panics
This function does not panic.