Function dotfiles_core::yaml_util::get_string_setting

source ·
pub fn get_string_setting(
    name: &str,
    context_settings: &Settings,
    directive_defaults: &Settings
) -> Result<String, DotfilesError>
Expand description

Gets a String value for the setting named name.

First it tries to find a value for the setting in the context_settings argument, if it doesn’t contain any it falls back to directive-defaults.

Returns an error if no such setting was found in either setting collection.