pub trait RuleSeverity {
// Required method
fn rule_severity(&self, source: &SeveritySource<'_>) -> Severity;
// Provided method
fn uniform_severity(_source: &SeveritySource<'_>) -> Option<Severity>
where Self: Sized { ... }
}Expand description
A dead-code finding whose severity comes from the configured rules.
Required Methods§
Sourcefn rule_severity(&self, source: &SeveritySource<'_>) -> Severity
fn rule_severity(&self, source: &SeveritySource<'_>) -> Severity
The severity of this finding under source.
Provided Methods§
Sourcefn uniform_severity(_source: &SeveritySource<'_>) -> Option<Severity>where
Self: Sized,
fn uniform_severity(_source: &SeveritySource<'_>) -> Option<Severity>where
Self: Sized,
The severity that every finding of this kind has under source, or
None when the severity can differ from finding to finding.
The exit-code check reads this once per collection instead of once per finding.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".