pub struct AuditResult {
pub name: String,
pub version: String,
pub scope: AuditScope,
pub findings: Vec<Finding>,
}Expand description
Result of an audit run.
Fields§
§name: StringSubject name.
version: StringSubject version.
scope: AuditScopeScope that produced this result.
findings: Vec<Finding>Findings discovered (deduped, allow-list filtered, sorted by id).
Implementations§
Source§impl AuditResult
impl AuditResult
Sourcepub fn count_at_or_above(&self, threshold: Severity) -> usize
pub fn count_at_or_above(&self, threshold: Severity) -> usize
Number of findings at the given severity or higher.
Info < Warning < Error < Critical.
Sourcepub fn count_from(&self, source: FindingSource) -> usize
pub fn count_from(&self, source: FindingSource) -> usize
Number of findings from the given source.
Sourcepub fn worst_severity(&self) -> Option<Severity>
pub fn worst_severity(&self) -> Option<Severity>
Highest severity present in the findings, if any.
Sourcepub fn into_report(self) -> Report
pub fn into_report(self) -> Report
Convert this result into a dev_report::Report.
Pass when there are no findings; otherwise push one
CheckResult::fail per finding, named
security::<source>::<id> and tagged security plus a
source-specific tag (cve for audit, policy for deny).
Each check carries Evidence::KeyValue with crate,
affected_version, and url when known.
Trait Implementations§
Source§impl Clone for AuditResult
impl Clone for AuditResult
Source§fn clone(&self) -> AuditResult
fn clone(&self) -> AuditResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuditResult
impl Debug for AuditResult
Source§impl<'de> Deserialize<'de> for AuditResult
impl<'de> Deserialize<'de> for AuditResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuditResult
impl RefUnwindSafe for AuditResult
impl Send for AuditResult
impl Sync for AuditResult
impl Unpin for AuditResult
impl UnsafeUnpin for AuditResult
impl UnwindSafe for AuditResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more