Skip to main content

load_toml_file

Function load_toml_file 

Source
pub fn load_toml_file(
    path: &Path,
) -> Result<Option<HashMap<String, String>>, ConfigError>
Expand description

Read a TOML file and return its top-level keys as a flat string map.

Nested tables are flattened with dot-separated keys (database.host). Used by #[derive(Config)]-generated load implementations.

Returns Ok(None) if the file does not exist (not an error).