From efa3d30c41409acb51868684eb57ac2a23da6ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ing=2E=20Juan=20Jos=C3=A9=20Nicola?= Date: Mon, 14 Nov 2022 12:27:54 +0100 Subject: [PATCH] Change: make structs publics. Also, remove default trait for Nvt, since it is not necessary --- rust/nvtcache/src/nvt.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rust/nvtcache/src/nvt.rs b/rust/nvtcache/src/nvt.rs index 67f232d18..f59f03b69 100644 --- a/rust/nvtcache/src/nvt.rs +++ b/rust/nvtcache/src/nvt.rs @@ -2,6 +2,7 @@ use crate::dberror::DbError; use crate::dberror::Result; use std::collections::LinkedList; +///Alias for time stamps type TimeT = i64; #[derive(Debug, PartialEq, PartialOrd)] @@ -19,8 +20,9 @@ pub enum Category { ActEnd, } +/// Structure to store NVT preferences #[derive(Debug)] -struct NvtPref { +pub struct NvtPref { /// Preference ID pref_id: i32, /// Preference type @@ -31,8 +33,9 @@ struct NvtPref { default: String, } +/// Structure to store NVT References #[derive(Debug)] -struct NvtRef { +pub struct NvtRef { /// Reference type ("cve", "bid", ...) ref_type: String, /// Actual reference ID ("CVE-2018-1234", etc) @@ -41,8 +44,9 @@ struct NvtRef { ref_text: String, } +/// Structure to store NVT Severities #[derive(Debug)] -struct NvtSeverity { +pub struct NvtSeverity { /// Severity type ("cvss_base_v2", ...) severity_type: String, /// Optional: Where does the severity come from @@ -128,10 +132,6 @@ pub struct Nvt { family: String, } -pub trait Default { - fn default() -> Nvt; -} - impl Default for Nvt { fn default() -> Nvt { Nvt {