Skip to content

Commit

Permalink
Change: make structs publics.
Browse files Browse the repository at this point in the history
Also, remove default trait for Nvt, since it is not necessary
  • Loading branch information
jjnicola committed Nov 23, 2022
1 parent 5b98771 commit efa3d30
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rust/nvtcache/src/nvt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -128,10 +132,6 @@ pub struct Nvt {
family: String,
}

pub trait Default {
fn default() -> Nvt;
}

impl Default for Nvt {
fn default() -> Nvt {
Nvt {
Expand Down

0 comments on commit efa3d30

Please sign in to comment.