pub fn read_all(paths: &Vec<PathBuf>) -> HashMap<String, Config>Expand description
Reads multiple configuration files and returns them indexed by name.
This function attempts to read all provided configuration files. If a file fails to parse, an error is logged and that file is skipped. The resulting HashMap uses either the configured name or the file path as the key.
§Arguments
paths- Vector of configuration file paths to read
§Returns
HashMap<String, Config>- Successfully parsed configurations indexed by name
§Examples
use std::path::PathBuf;
let paths = vec![
PathBuf::from("config1.yaml"),
PathBuf::from("config2.yaml"),
];
let configs = read_all(&paths);
println!("Loaded {} configurations", configs.len());