csaf-rs 0.5.1

A parser for the CSAF standard written in Rust
use crate::csaf::traits::util::impl_str_field_getter;
use crate::schema::csaf2_0::schema::Id as Id20;
use crate::schema::csaf2_1::schema::Id as Id21;

pub trait VulnerabilityIdTrait {
    fn get_system_name(&self) -> &str;

    fn get_text(&self) -> &str;
}

impl VulnerabilityIdTrait for Id20 {
    impl_str_field_getter!(get_system_name, system_name);
    impl_str_field_getter!(get_text, text);
}

impl VulnerabilityIdTrait for Id21 {
    impl_str_field_getter!(get_system_name, system_name);
    impl_str_field_getter!(get_text, text);
}