ValidationRule

Trait ValidationRule 

Source
pub trait ValidationRule: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn validate(&self, adr: &Adr, report: &mut ValidationReport);
}
Expand description

Trait for implementing validation rules.

Each rule should be focused and check for a specific condition.

Required Methods§

Source

fn name(&self) -> &str

Returns the human-readable name of this rule.

Source

fn description(&self) -> &str

Returns a description of what this rule checks.

Source

fn validate(&self, adr: &Adr, report: &mut ValidationReport)

Validates a single ADR, appending any issues to the report.

Implementors§