pub struct SchemaAnalyzer<'a> {
pub schema: &'a Schema,
pub entries: Vec<u8>,
pub field_states: AHashMap<String, AnalyzerFieldState>,
pub compression_options: CompressionOptions,
}
Expand description
Analyzes binary structures against a schema definition
Maintains state between data ingestion and final analysis:
- Parsed schema structure
- Accumulated raw data entries
- Intermediate analysis state
Fields§
§schema: &'a Schema
Schema definition tree
entries: Vec<u8>
Raw data as fed into the analyzer.
field_states: AHashMap<String, AnalyzerFieldState>
Intermediate analysis state (field name → statistics) This supports both ‘groups’ and fields.
compression_options: CompressionOptions
Configuration options for analysis.
Implementations§
Source§impl<'a> SchemaAnalyzer<'a>
impl<'a> SchemaAnalyzer<'a>
Sourcepub fn new(schema: &'a Schema, options: CompressionOptions) -> Self
pub fn new(schema: &'a Schema, options: CompressionOptions) -> Self
Creates a new analyzer bound to a specific schema
§Example
let options = CompressionOptions::default();
let analyzer = SchemaAnalyzer::new(&schema, options);
Sourcepub fn generate_results(
&mut self,
) -> Result<AnalysisResults, ComputeAnalysisResultsError>
pub fn generate_results( &mut self, ) -> Result<AnalysisResults, ComputeAnalysisResultsError>
Generates final analysis results
§Returns
Computed metrics including:
- Entropy calculations
- Bit distribution statistics
- Value frequency analysis
Auto Trait Implementations§
impl<'a> Freeze for SchemaAnalyzer<'a>
impl<'a> RefUnwindSafe for SchemaAnalyzer<'a>
impl<'a> Send for SchemaAnalyzer<'a>
impl<'a> Sync for SchemaAnalyzer<'a>
impl<'a> Unpin for SchemaAnalyzer<'a>
impl<'a> UnwindSafe for SchemaAnalyzer<'a>
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> 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