pub trait Rule:
Debug
+ DynClone
+ Send
+ Sync {
// Required methods
fn name(&self) -> &'static str;
fn group(&self) -> &'static str;
// Provided methods
fn docs(&self) -> &'static str { ... }
fn tags(&self) -> &'static [Tag] { ... }
fn recommended(&self) -> bool { ... }
}
Expand description
A generic trait which describes things common to a rule regardless on what they run on.
Each rule should have a new
function for easy instantiation. We however do not require this
for the purposes of allowing more complex rules to instantiate themselves in a different way.
However the rules must be easily instantiated because of rule groups.
Required Methods§
Provided Methods§
A list of tags present on this rule. Empty by default.
Sourcefn recommended(&self) -> bool
fn recommended(&self) -> bool
Whether this rule is recommended, this is a simple helper around Self::tags
.