#[non_exhaustive]pub enum Cvss {
CvssV30(Base),
CvssV31(Base),
CvssV40(Vector),
}Available on crate features
v3 or v4 only.Expand description
A CVSS vector
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CvssV30(Base)
Available on crate feature
v3 only.A CVSS 3.0 base vector
CvssV31(Base)
Available on crate feature
v3 only.A CVSS 3.1 base vector
CvssV40(Vector)
Available on crate feature
v4 only.A CVSS 4.0 vector
Implementations§
Source§impl Cvss
impl Cvss
Sourcepub fn score(&self) -> f64
Available on crate feature std only.
pub fn score(&self) -> f64
std only.Get the score of this CVSS vector
The different versions of CVSS have dedicated Score types.
For CVSSv4 specifically, the dedicated type includes the nomenclature information.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cvss
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Cvss
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Cvss
impl StructuralPartialEq for Cvss
Auto Trait Implementations§
impl Freeze for Cvss
impl RefUnwindSafe for Cvss
impl Send for Cvss
impl Sync for Cvss
impl Unpin for Cvss
impl UnwindSafe for Cvss
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more