pub struct ScanReport { /* private fields */ }Expand description
Findings produced by scanning one UTF-8 source.
Findings are stored in deterministic source order. A report owns its findings and cannot be mutated after construction.
Implementations§
Source§impl ScanReport
impl ScanReport
Sourcepub fn candidates(&self) -> &[SensitiveCandidate]
pub fn candidates(&self) -> &[SensitiveCandidate]
Returns ambiguous sensitive candidates in deterministic source order.
Candidates are review-only structural observations. They are not findings and do not carry severity, finding confidence or remediation.
Sourcepub fn candidate_len(&self) -> usize
pub fn candidate_len(&self) -> usize
Returns the number of ambiguous sensitive candidates in this report.
Sourcepub fn has_candidates(&self) -> bool
pub fn has_candidates(&self) -> bool
Returns true when this report contains at least one ambiguous
sensitive candidate.
Sourcepub fn needs_review(&self) -> bool
pub fn needs_review(&self) -> bool
Returns true when either a finding or an ambiguous sensitive candidate
requires review.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when this report contains no findings.
Ambiguous sensitive candidates are intentionally not findings and
therefore do not affect this compatibility helper. Use
ScanReport::needs_review when candidates must also be considered.
Sourcepub fn has_critical(&self) -> bool
pub fn has_critical(&self) -> bool
Returns true when at least one finding is critical.
Iteration stops as soon as the first critical finding is encountered.
Sourcepub fn by_severity(
&self,
severity: Severity,
) -> impl DoubleEndedIterator<Item = &Finding> + '_
pub fn by_severity( &self, severity: Severity, ) -> impl DoubleEndedIterator<Item = &Finding> + '_
Iterates over findings with exactly the requested severity.
This method performs no allocation and does not clone findings.
Returns an iterator that yields references to Findings with the given severity.
Sourcepub fn into_findings(self) -> Box<[Finding]>
pub fn into_findings(self) -> Box<[Finding]>
Consumes the report and returns its owned findings.
Sourcepub fn into_candidates(self) -> Box<[SensitiveCandidate]>
pub fn into_candidates(self) -> Box<[SensitiveCandidate]>
Consumes the report and returns its ambiguous sensitive candidates.