pub struct StreamingJsonWriter<'w, W: Write> { /* private fields */ }Expand description
A streaming JSON report writer that writes incrementally.
Unlike the standard JsonReporter, this writer streams data directly
to the output without building the entire JSON document in memory.
Implementations§
Source§impl<'w, W: Write> StreamingJsonWriter<'w, W>
impl<'w, W: Write> StreamingJsonWriter<'w, W>
Sourcepub fn with_flush_interval(self, interval: usize) -> Self
pub fn with_flush_interval(self, interval: usize) -> Self
Set the flush interval (number of items between flushes).
Sourcepub fn write_diff_report(
self,
result: &DiffResult,
old_sbom: &NormalizedSbom,
new_sbom: &NormalizedSbom,
config: &ReportConfig,
) -> Result<(), ReportError>
pub fn write_diff_report( self, result: &DiffResult, old_sbom: &NormalizedSbom, new_sbom: &NormalizedSbom, config: &ReportConfig, ) -> Result<(), ReportError>
Write a complete diff report.
Auto Trait Implementations§
impl<'w, W> Freeze for StreamingJsonWriter<'w, W>
impl<'w, W> RefUnwindSafe for StreamingJsonWriter<'w, W>where
W: RefUnwindSafe,
impl<'w, W> Send for StreamingJsonWriter<'w, W>where
W: Send,
impl<'w, W> Sync for StreamingJsonWriter<'w, W>where
W: Sync,
impl<'w, W> Unpin for StreamingJsonWriter<'w, W>
impl<'w, W> UnsafeUnpin for StreamingJsonWriter<'w, W>
impl<'w, W> !UnwindSafe for StreamingJsonWriter<'w, W>
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 more