pub struct StreamingJsonWriter<W: Write> { /* private fields */ }
Expand description
Streaming JSON writer with buffering support
Implementations§
Source§impl<W: Write> StreamingJsonWriter<W>
impl<W: Write> StreamingJsonWriter<W>
Sourcepub fn new(writer: W) -> TrackingResult<Self>
pub fn new(writer: W) -> TrackingResult<Self>
Create a new streaming JSON writer with default configuration
Sourcepub fn with_config(
writer: W,
config: StreamingWriterConfig,
) -> TrackingResult<Self>
pub fn with_config( writer: W, config: StreamingWriterConfig, ) -> TrackingResult<Self>
Create a new streaming JSON writer with custom configuration
Sourcepub fn write_unsafe_ffi_header(
&mut self,
metadata: &ExportMetadata,
) -> TrackingResult<()>
pub fn write_unsafe_ffi_header( &mut self, metadata: &ExportMetadata, ) -> TrackingResult<()>
Write the JSON header with metadata
Sourcepub fn write_unsafe_allocations_stream(
&mut self,
data: &ProcessedUnsafeData,
) -> TrackingResult<()>
pub fn write_unsafe_allocations_stream( &mut self, data: &ProcessedUnsafeData, ) -> TrackingResult<()>
Write unsafe allocations data in streaming fashion
Sourcepub fn write_ffi_allocations_stream(
&mut self,
data: &ProcessedFFIData,
) -> TrackingResult<()>
pub fn write_ffi_allocations_stream( &mut self, data: &ProcessedFFIData, ) -> TrackingResult<()>
Write FFI allocations data in streaming fashion
Sourcepub fn write_boundary_events_stream(
&mut self,
data: &ProcessedBoundaryData,
) -> TrackingResult<()>
pub fn write_boundary_events_stream( &mut self, data: &ProcessedBoundaryData, ) -> TrackingResult<()>
Write boundary events data in streaming fashion
Sourcepub fn write_safety_violations_stream<T: Serialize>(
&mut self,
violations: &[T],
) -> TrackingResult<()>
pub fn write_safety_violations_stream<T: Serialize>( &mut self, violations: &[T], ) -> TrackingResult<()>
Write safety violations in streaming fashion
Sourcepub fn write_processing_metrics(
&mut self,
metrics: &BatchProcessingMetrics,
) -> TrackingResult<()>
pub fn write_processing_metrics( &mut self, metrics: &BatchProcessingMetrics, ) -> TrackingResult<()>
Write processing metrics
Sourcepub fn finalize(&mut self) -> TrackingResult<StreamingStats>
pub fn finalize(&mut self) -> TrackingResult<StreamingStats>
Finalize the JSON document and flush all buffers
Sourcepub fn get_stats(&self) -> &StreamingStats
pub fn get_stats(&self) -> &StreamingStats
Get current streaming statistics
Sourcepub fn flush(&mut self) -> TrackingResult<()>
pub fn flush(&mut self) -> TrackingResult<()>
Force flush the writer
Auto Trait Implementations§
impl<W> Freeze for StreamingJsonWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for StreamingJsonWriter<W>where
W: RefUnwindSafe,
impl<W> Send for StreamingJsonWriter<W>where
W: Send,
impl<W> Sync for StreamingJsonWriter<W>where
W: Sync,
impl<W> Unpin for StreamingJsonWriter<W>where
W: Unpin,
impl<W> UnwindSafe for StreamingJsonWriter<W>where
W: UnwindSafe,
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