pub struct CVE {
pub id: String,
pub severity: CVESeverity,
pub cvss_score: f32,
pub description: String,
pub affected_products: Vec<String>,
pub affected_versions: Vec<String>,
pub published_date: Option<DateTime<Utc>>,
pub references: Vec<String>,
}Expand description
Common Vulnerability and Exposure entry
Fields§
§id: String§severity: CVESeverity§cvss_score: f32§description: String§affected_products: Vec<String>§affected_versions: Vec<String>§published_date: Option<DateTime<Utc>>§references: Vec<String>Implementations§
Source§impl CVE
impl CVE
Sourcepub fn new(
id: &str,
severity: CVESeverity,
cvss_score: f32,
description: &str,
) -> Self
pub fn new( id: &str, severity: CVESeverity, cvss_score: f32, description: &str, ) -> Self
Create a new CVE entry
Sourcepub fn affects_version(&self, version: &str) -> bool
pub fn affects_version(&self, version: &str) -> bool
Check if a version is affected
Sourcepub fn affects_product(&self, product: &str) -> bool
pub fn affects_product(&self, product: &str) -> bool
Check if a product is affected
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CVE
impl<'de> Deserialize<'de> for CVE
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CVE
impl RefUnwindSafe for CVE
impl Send for CVE
impl Sync for CVE
impl Unpin for CVE
impl UnwindSafe for CVE
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