Skip to main content

Rule

Trait Rule 

Source
pub trait Rule {
    // Required method
    fn name(&self) -> &'static str;

    // Provided methods
    fn check(&self, _file: &SourceFile) -> Vec<Offence> { ... }
    fn check_workspace(&self, _files: &[SourceFile]) -> Vec<Offence> { ... }
}

Required Methods§

Source

fn name(&self) -> &'static str

Provided Methods§

Source

fn check(&self, _file: &SourceFile) -> Vec<Offence>

Source

fn check_workspace(&self, _files: &[SourceFile]) -> Vec<Offence>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§