pub struct CheckReport {
pub findings: Vec<CheckFinding>,
}Expand description
The full result of one check invocation.
Fields§
§findings: Vec<CheckFinding>Every finding produced across every walked manifest.
Implementations§
Source§impl CheckReport
impl CheckReport
Sourcepub fn summary(&self) -> BTreeMap<Category, usize>
pub fn summary(&self) -> BTreeMap<Category, usize>
Per-category finding counts, derived from Self::findings rather than kept as
separately mutated state (spec 062 tasks.md T020).
§Examples
use deps_cli::report::{Category, CheckFinding, CheckReport};
use deps_core::EcosystemId;
use deps_core::diagnostic::Severity;
use deps_core::position::Range;
use std::path::PathBuf;
let report = CheckReport {
findings: vec![CheckFinding {
ecosystem: EcosystemId::Cargo,
manifest_path: PathBuf::from("Cargo.toml"),
dependency_name: Some("serde".to_string()),
requirement: Some("1.0".to_string()),
category: Category::Outdated,
code: None,
advisory_url: None,
advisory_severity: None,
severity: Severity::Hint,
range: Range::default(),
message: "Newer version available: 1.1".to_string(),
}],
};
assert_eq!(report.summary().get(&Category::Outdated), Some(&1));Trait Implementations§
Source§impl Clone for CheckReport
impl Clone for CheckReport
Source§impl Debug for CheckReport
impl Debug for CheckReport
Auto Trait Implementations§
impl Freeze for CheckReport
impl RefUnwindSafe for CheckReport
impl Send for CheckReport
impl Sync for CheckReport
impl Unpin for CheckReport
impl UnsafeUnpin for CheckReport
impl UnwindSafe for CheckReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more