Skip to main content

DocRule

Trait DocRule 

Source
pub trait DocRule {
    // Required methods
    fn id(&self) -> &str;
    fn run(&self, tree: &DocTree, ctx: &Ctx<'_>) -> Vec<Finding>;
}
Expand description

A doc-scoped named rule, run once over the whole projected tree.

Required Methods§

Source

fn id(&self) -> &str

The rule’s id, used in the findings it makes.

Source

fn run(&self, tree: &DocTree, ctx: &Ctx<'_>) -> Vec<Finding>

Check the whole document and return its findings.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§