Returns the Yaml as a `&str` or an error if it isn't.
(yaml: &Yaml)
| 194 | |
| 195 | /// Returns the Yaml as a `&str` or an error if it isn't. |
| 196 | pub fn as_str_checked(yaml: &Yaml) -> Result<&str> { |
| 197 | return Ok( yaml.as_str().ok_or_else(|| yaml_type_err(yaml, "string"))? ); |
| 198 | } |
| 199 | |
| 200 | |
| 201 | /// A bit of a hack to concatenate replacements (without a ' '). |
no test coverage detected