pub struct ReportConfig {
pub report_types: Vec<ReportType>,
pub max_items: Option<usize>,
pub include_field_changes: bool,
pub title: Option<String>,
pub metadata: ReportMetadata,
pub only_changes: bool,
pub min_severity: Option<MinSeverity>,
pub old_cra_compliance: Option<ComplianceResult>,
pub new_cra_compliance: Option<ComplianceResult>,
pub view_cra_compliance: Option<ComplianceResult>,
}Expand description
Configuration for report generation
Fields§
§report_types: Vec<ReportType>Which report types to include
max_items: Option<usize>Maximum items per section
include_field_changes: boolInclude detailed field changes
title: Option<String>Title for the report
metadata: ReportMetadataAdditional metadata to include
only_changes: boolOnly show items with changes (filter out unchanged)
min_severity: Option<MinSeverity>Minimum severity level for vulnerability filtering
old_cra_compliance: Option<ComplianceResult>Pre-computed CRA compliance for old SBOM (avoids redundant recomputation)
new_cra_compliance: Option<ComplianceResult>Pre-computed CRA compliance for new SBOM (avoids redundant recomputation)
view_cra_compliance: Option<ComplianceResult>Pre-computed CRA compliance for single SBOM in view mode
Implementations§
Source§impl ReportConfig
impl ReportConfig
Sourcepub fn old_cra_compliance_or_bare(
&self,
old_sbom: &NormalizedSbom,
) -> ComplianceResult
pub fn old_cra_compliance_or_bare( &self, old_sbom: &NormalizedSbom, ) -> ComplianceResult
CRA Phase 2 compliance for the old SBOM of a diff report.
Returns the pre-computed Self::old_cra_compliance when populated —
every first-party pipeline (the diff report stage and the TUI export)
populates it with a sidecar-aware result so all output formats agree
with the TUI. The bare (sidecar-less) computation only exists as a
last resort for direct library callers that hand a reporter a default
ReportConfig; it lives here, in one place, so the individual
reporters cannot re-grow divergent fallback checkers.
Sourcepub fn new_cra_compliance_or_bare(
&self,
new_sbom: &NormalizedSbom,
) -> ComplianceResult
pub fn new_cra_compliance_or_bare( &self, new_sbom: &NormalizedSbom, ) -> ComplianceResult
CRA Phase 2 compliance for the new SBOM of a diff report.
See Self::old_cra_compliance_or_bare for the fallback contract.
Sourcepub fn view_cra_compliance_or_bare(
&self,
sbom: &NormalizedSbom,
) -> ComplianceResult
pub fn view_cra_compliance_or_bare( &self, sbom: &NormalizedSbom, ) -> ComplianceResult
CRA Phase 2 compliance for the SBOM of a view report.
See Self::old_cra_compliance_or_bare for the fallback contract.
Sourcepub fn with_types(types: Vec<ReportType>) -> Self
pub fn with_types(types: Vec<ReportType>) -> Self
Create a config for specific report types
Sourcepub fn includes(&self, report_type: ReportType) -> bool
pub fn includes(&self, report_type: ReportType) -> bool
Check if a report type should be included
Trait Implementations§
Source§impl Clone for ReportConfig
impl Clone for ReportConfig
Source§fn clone(&self) -> ReportConfig
fn clone(&self) -> ReportConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReportConfig
impl Debug for ReportConfig
Source§impl Default for ReportConfig
impl Default for ReportConfig
Source§impl<'de> Deserialize<'de> for ReportConfig
impl<'de> Deserialize<'de> for ReportConfig
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>,
Auto Trait Implementations§
impl Freeze for ReportConfig
impl RefUnwindSafe for ReportConfig
impl Send for ReportConfig
impl Sync for ReportConfig
impl Unpin for ReportConfig
impl UnsafeUnpin for ReportConfig
impl UnwindSafe for ReportConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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