pub fn load_rule(path: &Path) -> Result<CodemodRule>Expand description
Load a codemod rule from a YAML file.
The rule is deserialized and then validated. Invalid rules are rejected
with a CodemodError::Rule.
ยงErrors
CodemodError::Ioif the file cannot be read.CodemodError::Ruleif the YAML is malformed or the rule fails validation.