pub struct FieldParser { /* private fields */ }
Expand description
Selective field parser that can parse only requested fields
Implementations§
Source§impl FieldParser
impl FieldParser
Sourcepub fn with_config(config: FieldParserConfig) -> Self
pub fn with_config(config: FieldParserConfig) -> Self
Create a new field parser with custom configuration
Sourcepub fn parse_selective_fields<R: Read + Seek>(
&mut self,
reader: &mut R,
requested_fields: &HashSet<AllocationField>,
) -> Result<PartialAllocationInfo, BinaryExportError>
pub fn parse_selective_fields<R: Read + Seek>( &mut self, reader: &mut R, requested_fields: &HashSet<AllocationField>, ) -> Result<PartialAllocationInfo, BinaryExportError>
Parse only the requested fields from a binary record
Sourcepub fn parse_full_allocation<R: Read + Seek>(
&mut self,
reader: &mut R,
) -> Result<AllocationInfo, BinaryExportError>
pub fn parse_full_allocation<R: Read + Seek>( &mut self, reader: &mut R, ) -> Result<AllocationInfo, BinaryExportError>
Parse an allocation record with all fields (for compatibility)
Sourcepub fn get_stats(&self) -> &FieldParserStats
pub fn get_stats(&self) -> &FieldParserStats
Get parsing statistics
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset parsing statistics
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the field cache
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get cache size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldParser
impl RefUnwindSafe for FieldParser
impl Send for FieldParser
impl Sync for FieldParser
impl Unpin for FieldParser
impl UnwindSafe for FieldParser
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