logo
pub trait Metric: Copy + Clone + Debug + Display + Eq + FromStr + Ord {
    const TYPE: MetricType;

    fn score(self) -> f64;
    fn as_str(self) -> &'static str;

    fn name() -> &'static str { ... }
}
Expand description

Trait for CVSS metrics.

Required Associated Constants

MetricType of this metric.

Required Methods

Get CVSS v3.1 score for this metric.

Get str describing this metric’s value

Provided Methods

Get the name of this metric.

Implementors