Skip to main content

Rule

Trait Rule 

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

A node-scoped named rule, run against each declared, present section that carries it.

Required Methods§

Source

fn id(&self) -> &str

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

Source

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

Check one section and return its findings.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§