Function dotfiles_core::yaml_util::get_integer_from_yaml_hash
source · pub fn get_integer_from_yaml_hash(
name: &str,
yaml: &StrictYaml
) -> Result<i64, DotfilesError>
Expand description
Gets a specific integer 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 integer.
- ErrorType::IncompleteConfigurationError if the hash does not contain the requested key