Function dotfiles_core::yaml_util::get_boolean_setting_from_context
source · pub fn get_boolean_setting_from_context(
name: &str,
context_settings: &Settings,
directive_defaults: &Settings
) -> Result<bool, DotfilesError>
Expand description
Gets a boolean 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.