Skip to main content

Rule

Trait Rule 

Source
trait Rule: Send + Sync {
    // Required method
    fn check(&self, ctx: &FileContext<'_>) -> Vec<Box<dyn RuleViolation>>;
}
Expand description

Object-safe rule interface used by the dispatcher.

Concrete rules implement TypedRule. Its blanket implementation erases the concrete violation type only at this registry boundary.

Required Methods§

Source

fn check(&self, ctx: &FileContext<'_>) -> Vec<Box<dyn RuleViolation>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> Rule for T
where T: TypedRule,