pub struct Summary {
pub critical: usize,
pub high: usize,
pub medium: usize,
pub low: usize,
pub passed: bool,
pub errors: usize,
pub warnings: usize,
}Fields§
§critical: usize§high: usize§medium: usize§low: usize§passed: bool§errors: usizeNumber of findings with RuleSeverity::Error
warnings: usizeNumber of findings with RuleSeverity::Warn
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn from_findings(findings: &[Finding]) -> Self
pub fn from_findings(findings: &[Finding]) -> Self
Creates a Summary from findings.
Note: This method does not set errors/warnings counts.
Use from_findings_with_rule_severity when rule_severity is assigned.
Sourcepub fn from_findings_with_rule_severity(findings: &[Finding]) -> Self
pub fn from_findings_with_rule_severity(findings: &[Finding]) -> Self
Creates a Summary from findings with rule_severity counts.
The passed field is determined by whether there are any errors.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Summary
impl<'de> Deserialize<'de> for Summary
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 Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnwindSafe for Summary
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