Skip to main content

Rule

Trait Rule 

Source
pub trait Rule {
    // Required methods
    fn metadata(&self) -> &RuleMetadata;
    fn match_file(
        &self,
        file: &ParsedFile,
        ctx: &RuleContext<'_>,
    ) -> Vec<RuleMatch>;
}

Required Methods§

Source

fn metadata(&self) -> &RuleMetadata

Source

fn match_file(&self, file: &ParsedFile, ctx: &RuleContext<'_>) -> Vec<RuleMatch>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§