pub trait Rule {
// Required methods
fn name(&self) -> &'static str;
fn check(&self, file: &SourceFile) -> Vec<Offence>;
fn check_workspace(&self, files: &[SourceFile]) -> Vec<Offence>;
fn is_configured(&self) -> bool;
fn requirement(&self) -> Option<&'static str>;
fn explanation(&self) -> RuleExplanation;
}Required Methods§
fn name(&self) -> &'static str
fn check(&self, file: &SourceFile) -> Vec<Offence>
fn check_workspace(&self, files: &[SourceFile]) -> Vec<Offence>
fn is_configured(&self) -> bool
fn requirement(&self) -> Option<&'static str>
fn explanation(&self) -> RuleExplanation
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".