pub trait Rule: Send + Sync {
// Required methods
fn meta(&self) -> &RuleMeta;
fn run(
&self,
program: &Program<'_>,
semantic: &Semantic<'_>,
source_text: &str,
) -> Vec<RuleFinding>;
// Provided methods
fn fix(&self, _finding: &RuleFinding, _source_text: &str) -> Option<Fix> { ... }
fn has_fix(&self) -> bool { ... }
}Required Methods§
fn meta(&self) -> &RuleMeta
fn run( &self, program: &Program<'_>, semantic: &Semantic<'_>, source_text: &str, ) -> Vec<RuleFinding>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".