NessusClientDataV2

Struct NessusClientDataV2 

Source
pub struct NessusClientDataV2<'input> {
    pub policy: Policy<'input>,
    pub report: Option<Report<'input>>,
}
Expand description

Represents the root of a Nessus v2 XML report, corresponding to the <NessusClientData_v2> element.

This is the main entry point for a parsed .nessus file. It contains the scan policy that was used and the report itself, which holds the results of the scan.

Fields§

§policy: Policy<'input>

The policy configuration used for the Nessus scan.

§report: Option<Report<'input>>

The results of the scan, containing all discovered hosts and their vulnerabilities.

Implementations§

Source§

impl<'input> NessusClientDataV2<'input>

Source

pub fn parse(xml: &'input str) -> Result<Self, FormatError>

Parses a string containing a .nessus (v2) XML report.

This function is the main entry point for the parser. It takes the entire XML content of a .nessus file as a string slice and attempts to parse it into a structured NessusClientDataV2 object.

§Errors

Returns a FormatError if the input string is not a valid Nessus v2 report. This can happen for several reasons, including:

  • The XML is malformed.
  • The root element is not <NessusClientData_v2>.
  • Required elements or attributes (e.g., <Policy>) are missing.
  • Elements that should be unique appear multiple times.
  • Data cannot be converted to the expected type (e.g., a non-integer value for a port number).

Trait Implementations§

Source§

impl<'input> Debug for NessusClientDataV2<'input>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'input> Freeze for NessusClientDataV2<'input>

§

impl<'input> RefUnwindSafe for NessusClientDataV2<'input>

§

impl<'input> Send for NessusClientDataV2<'input>

§

impl<'input> Sync for NessusClientDataV2<'input>

§

impl<'input> Unpin for NessusClientDataV2<'input>

§

impl<'input> UnwindSafe for NessusClientDataV2<'input>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.