pub fn doc_rule<F>(id: impl Into<String>, f: F) -> Box<dyn DocRule>where F: Fn(&DocTree, &Ctx<'_>) -> Vec<Finding> + 'static,
A doc-scoped named rule from a closure — the TS docRule(id, fn).
docRule(id, fn)