Skip to main content

extract_safe_config

Function extract_safe_config 

Source
pub fn extract_safe_config(
    source_path: &str,
    input: &str,
) -> Result<SafeConfigDocument, ConfigExtractionError>
Expand description

Extracts only configuration key names, nested scopes, and value-free diagnostics.

The source path selects dotenv, YAML, JSON, or TOML parsing. Keys are deduplicated by (scope, name), retain their earliest declaration line, and are returned in deterministic path order.

ยงErrors

Returns ConfigExtractionError for unsupported paths, malformed input, or a fixed size, depth, key-count, or key-length budget violation.