Skip to content

Commit

Permalink
Add: function for returning NvtRef members
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Nov 23, 2022
1 parent 34ea442 commit ef20279
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rust/nvtcache/src/nvt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,26 @@ impl NvtPref {
}

impl NvtRef {
/// Return a new NvtRef object with the passed values
pub fn new(ref_type: String, ref_id: String, ref_text: String) -> Result<NvtRef> {
Ok(NvtRef {
ref_type,
ref_id,
ref_text,
})
}
/// Return the type of the NvtRef
pub fn get_type(&mut self) -> String {
return self.ref_type;
}
/// Return the id of the NvtRef
pub fn get_id(&mut self) -> String {
return self.ref_id;
}
/// Return the text of the NvtRef
pub fn get_text(&mut self) -> String {
return self.ref_text;
}
}

impl NvtSeverity {
Expand Down

0 comments on commit ef20279

Please sign in to comment.