Function dotfiles_core::yaml_util::get_string_array_from_yaml_hash
source · pub fn get_string_array_from_yaml_hash(
name: &str,
yaml: &StrictYaml
) -> Result<Vec<String>, DotfilesError>
Expand description
Gets a specific string array 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 array, or some of its values are not string.
- ErrorType::IncompleteConfigurationError if the hash does not contain the requested key