pub struct NdjsonReportGenerator;Expand description
ReportGenerator adapter for NdjsonReporter.
NdjsonReporter implements WriterReporter directly so it can stream
without buffering, which makes it incompatible with the blanket
WriterReporter impl over ReportGenerator. This thin wrapper bridges it
into the Box<dyn ReportGenerator> world used by create_reporter,
buffering the NDJSON into a String on demand.
Implementations§
Trait Implementations§
Source§impl Default for NdjsonReportGenerator
impl Default for NdjsonReportGenerator
Source§fn default() -> NdjsonReportGenerator
fn default() -> NdjsonReportGenerator
Returns the “default value” for a type. Read more
Source§impl ReportGenerator for NdjsonReportGenerator
impl ReportGenerator for NdjsonReportGenerator
Source§fn generate_diff_report(
&self,
result: &DiffResult,
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
config: &ReportConfig,
) -> Result<String, ReportError>
fn generate_diff_report( &self, result: &DiffResult, old_sbom: &NormalizedSbom, new_sbom: &NormalizedSbom, config: &ReportConfig, ) -> Result<String, ReportError>
Generate a report from diff results
Source§fn generate_view_report(
&self,
sbom: &NormalizedSbom,
config: &ReportConfig,
) -> Result<String, ReportError>
fn generate_view_report( &self, sbom: &NormalizedSbom, config: &ReportConfig, ) -> Result<String, ReportError>
Generate a report for a single SBOM (view mode)
Source§fn format(&self) -> ReportFormat
fn format(&self) -> ReportFormat
Get the format this generator produces
Source§fn write_diff_report(
&self,
result: &DiffResult,
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
config: &ReportConfig,
writer: &mut dyn Write,
) -> Result<(), ReportError>
fn write_diff_report( &self, result: &DiffResult, old_sbom: &NormalizedSbom, new_sbom: &NormalizedSbom, config: &ReportConfig, writer: &mut dyn Write, ) -> Result<(), ReportError>
Write report to a writer
Auto Trait Implementations§
impl Freeze for NdjsonReportGenerator
impl RefUnwindSafe for NdjsonReportGenerator
impl Send for NdjsonReportGenerator
impl Sync for NdjsonReportGenerator
impl Unpin for NdjsonReportGenerator
impl UnsafeUnpin for NdjsonReportGenerator
impl UnwindSafe for NdjsonReportGenerator
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> StreamingReporter for Twhere
T: WriterReporter,
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WriterReporter for Twhere
T: ReportGenerator,
impl<T> WriterReporter for Twhere
T: ReportGenerator,
Source§fn write_diff_to<W>(
&self,
result: &DiffResult,
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
config: &ReportConfig,
writer: &mut W,
) -> Result<(), ReportError>where
W: Write,
fn write_diff_to<W>(
&self,
result: &DiffResult,
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
config: &ReportConfig,
writer: &mut W,
) -> Result<(), ReportError>where
W: Write,
Write a diff report to a writer. Read more
Source§fn write_view_to<W>(
&self,
sbom: &NormalizedSbom,
config: &ReportConfig,
writer: &mut W,
) -> Result<(), ReportError>where
W: Write,
fn write_view_to<W>(
&self,
sbom: &NormalizedSbom,
config: &ReportConfig,
writer: &mut W,
) -> Result<(), ReportError>where
W: Write,
Write a view report to a writer.
Source§fn format(&self) -> ReportFormat
fn format(&self) -> ReportFormat
Get the format this reporter produces