pub struct CVSS3Vector {
pub base: BaseVector,
pub temporal: Option<TemporalVector>,
pub environmental: Option<EnvironmentalVector>,
}Expand description
A CVSS V3.0 vector.
This structure contains a mandatory base vector, an optional temporal vector and an optional environmental vector.
Fields§
§base: BaseVectorMandatory Base vector.
temporal: Option<TemporalVector>Optional Temporal vector.
environmental: Option<EnvironmentalVector>Optional Environmental vector.
Implementations§
Source§impl CVSS3Vector
impl CVSS3Vector
Sourcepub fn parse_strict(cvss_string: &str) -> Result<Self, Vec<&'static str>>where
Self: Sized,
pub fn parse_strict(cvss_string: &str) -> Result<Self, Vec<&'static str>>where
Self: Sized,
Attempts to parse a string slice as a CVSS vector, in strict mode.
In strict mode, all fields must be in canonical order as defined by the CVSS specification. They must be present exactly once (for mandatory fields), or zero or one time for optional fields.
If parsing fails a list of of errors will be returned in a human readable format.
Sourcepub fn parse_nonstrict(cvss_string: &str) -> Result<Self, Vec<&'static str>>where
Self: Sized,
pub fn parse_nonstrict(cvss_string: &str) -> Result<Self, Vec<&'static str>>where
Self: Sized,
Attempts to parse a string slice as a CVSS vector, in non-strict mode.
In non-strict mode, the parser will make the best out of the input. Fields do not have to be in the canonical order, and can be repeated (the last occurence of a field will be used). All mandatory fields (per the CVSS specification) still have to be present in the input.
If parsing fails a list of of errors will be returned in a human readable format.
Trait Implementations§
Source§impl Clone for CVSS3Vector
impl Clone for CVSS3Vector
Source§fn clone(&self) -> CVSS3Vector
fn clone(&self) -> CVSS3Vector
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more