pub fn scan_rules_dir(rules_dir: &Path) -> Result<Vec<RawRuleFile>, Error>Expand description
Scan a directory for *.json rule files. Returns one
RawRuleFile per discovered file with path populated from the
on-disk filename. Order of the returned vector is unspecified — the
merge stage sorts by (order asc, path lex) so the loader does not
pre-sort.
§Errors
Returns Error::compile when:
rules_dirdoes not exist (an empty directory is fine, but a missing one is operator error and should fail loud).rules_direxists but is not a directory.- any
.jsonfile fails to parse asRawRuleFile.
Returns Error::io for filesystem-level read failures (permission
denied, broken symlink during traversal, etc.).