update: 增加一些 CUSA 结构体方法
Signed-off-by: Jia Chao <jiachao2130@126.com>
This commit is contained in:
parent
d92d0c2c49
commit
5c3eb4656f
32
src/lib.rs
32
src/lib.rs
|
@ -23,6 +23,38 @@ pub struct CUSA {
|
|||
pub cves: Vec<CVE>,
|
||||
}
|
||||
|
||||
impl CUSA {
|
||||
/// sa id
|
||||
pub fn id(&self) -> &str {
|
||||
&self.id
|
||||
}
|
||||
|
||||
/// sa info url
|
||||
pub fn url(&self) -> &str {
|
||||
&self.url
|
||||
}
|
||||
|
||||
/// title
|
||||
pub fn title(&self) -> &str {
|
||||
&self.title
|
||||
}
|
||||
|
||||
/// severity lvl
|
||||
pub fn severity(&self) -> &Severity {
|
||||
&self.severity
|
||||
}
|
||||
|
||||
/// 详尽的描述信息
|
||||
pub fn description(&self) -> &str {
|
||||
&self.description
|
||||
}
|
||||
|
||||
/// 包含的 cve 列表
|
||||
pub fn cves(&self) -> &Vec<CVE> {
|
||||
&self.cves
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum Severity {
|
||||
None,
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Reference in New Issue
Block a user