Skip to main content

quote_config_value

Function quote_config_value 

Source
pub fn quote_config_value(value: &str) -> String
Expand description

Quote a value for embedding in a config file.

If the value contains whitespace, double quotes, or backslashes, it is escaped and wrapped in double quotes. Otherwise returned as-is.

Suitable for AWS credential_process, INI-style configs, and similar formats.