macro_rules! cvss_component {
    ($(#[$m:meta])* $name:ident {
        $($(#[$meta:meta])* $variant:ident => $value:ident),*$(,)?
    }) => { ... };
}
Expand description

CVSS Component macro

This macro creates an enum for a CVSS Component and its values. It also creates a from_vector method that allows string parsing from a cvss string

Examples

use scayl::cvss_component;

cvss_component!(AttackVector {
    Network => N,
    Adjacent => A,
    Local => L,
    Physical => P,
});