Function dotfiles_core::yaml_util::get_boolean_from_yaml_hash
source · pub fn get_boolean_from_yaml_hash(
name: &str,
yaml: &StrictYaml
) -> Result<bool, DotfilesError>
Expand description
Gets a specific boolean setting from a yaml hash
§Errors
- ErrorType::UnexpectedYamlTypeError if the yaml is not a hash.
- ErrorType::UnexpectedYamlTypeError if the yaml does not have string keys.
- ErrorType::UnexpectedYamlTypeError if the value’s type is not boolean.
- ErrorType::IncompleteConfigurationError if the hash does not contain the requested key