pub struct StreamingFieldProcessor { /* private fields */ }
Expand description
Streaming field processor with constant memory usage
Implementations§
Source§impl StreamingFieldProcessor
impl StreamingFieldProcessor
Sourcepub fn with_config(config: StreamingFieldProcessorConfig) -> Self
pub fn with_config(config: StreamingFieldProcessorConfig) -> Self
Create a new streaming field processor with custom configuration
Sourcepub fn process_record_streaming<F>(
&mut self,
allocation: PartialAllocationInfo,
requested_fields: &HashSet<AllocationField>,
processor: F,
) -> Result<(), BinaryExportError>
pub fn process_record_streaming<F>( &mut self, allocation: PartialAllocationInfo, requested_fields: &HashSet<AllocationField>, processor: F, ) -> Result<(), BinaryExportError>
Process a single record with streaming (constant memory)
Sourcepub fn process_records_streaming<F>(
&mut self,
allocations: Vec<PartialAllocationInfo>,
requested_fields: &HashSet<AllocationField>,
processor: F,
) -> Result<(), BinaryExportError>
pub fn process_records_streaming<F>( &mut self, allocations: Vec<PartialAllocationInfo>, requested_fields: &HashSet<AllocationField>, processor: F, ) -> Result<(), BinaryExportError>
Process multiple records in streaming fashion
Sourcepub fn get_or_format_field(
&mut self,
cache_key: &str,
field: &AllocationField,
allocation: &PartialAllocationInfo,
) -> Result<Option<String>, BinaryExportError>
pub fn get_or_format_field( &mut self, cache_key: &str, field: &AllocationField, allocation: &PartialAllocationInfo, ) -> Result<Option<String>, BinaryExportError>
Get a cached field value or format and cache it
Sourcepub fn get_stats(&self) -> &StreamingFieldProcessorStats
pub fn get_stats(&self) -> &StreamingFieldProcessorStats
Get current statistics
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear all caches
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get current cache size
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get current memory usage
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingFieldProcessor
impl RefUnwindSafe for StreamingFieldProcessor
impl Send for StreamingFieldProcessor
impl Sync for StreamingFieldProcessor
impl Unpin for StreamingFieldProcessor
impl UnwindSafe for StreamingFieldProcessor
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