Rule

Trait Rule 

Source
pub trait Rule: Send + Sync {
    // Required methods
    fn id(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn explanation(&self) -> &'static str;
    fn deny(&mut self);
    fn severity(&self) -> Severity;
}
Expand description

A trait implemented by analysis rules.

Required Methods§

Source

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

The unique identifier for the rule.

The identifier is required to be pascal case and it is the identifier by which a rule is excepted or denied.

Source

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

A short, single sentence description of the rule.

Source

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

Get the long-form explanation of the rule.

Source

fn deny(&mut self)

Denies the rule.

Denying the rule treats any diagnostics it emits as an error.

Source

fn severity(&self) -> Severity

Gets the severity of the rule.

Implementors§