pub struct ProfileReport {
pub schema_version: u32,
pub id: String,
pub timestamp: String,
pub data_source: DataSource,
pub column_profiles: Vec<ColumnProfile>,
pub execution: ExecutionMetadata,
pub quality: Option<QualityAssessment>,
pub semantic_hint_bindings: Vec<SemanticHintBinding>,
}Expand description
Complete profiling report for a data source.
Contains column-level statistics, execution metadata, and an optional
Quality assessment informed by ISO 8000/25012 concepts. This is the primary output of all
profiling operations (Profiler::analyze_file, Profiler::analyze_source,
Profiler::profile_stream, etc.).
Fields§
§schema_version: u32Version of the serialized report schema (see REPORT_SCHEMA_VERSION).
0 means the document predates schema versioning (a 0.9-era report).
Deserialization rejects versions newer than REPORT_SCHEMA_VERSION.
id: StringUnique identifier for this report (UUID v4)
timestamp: StringTimestamp when the report was generated (ISO 8601 / RFC 3339)
data_source: DataSourceData source metadata (file, query, etc.)
column_profiles: Vec<ColumnProfile>Column-level profiling results
execution: ExecutionMetadataExecution metadata (timing, rows processed, truncation info, etc.)
quality: Option<QualityAssessment>Data quality assessment (optional — partial analysis may skip quality)
semantic_hint_bindings: Vec<SemanticHintBinding>Per-column evidence of how each semantic hint bound to the data.
Empty when no hints were supplied. Recorded for provenance: a hint proven inert over the full data is rejected before a report is returned, so a successful report only carries bindings that matched something or whose evidence was sampled. Additive field — older readers ignore it.
Implementations§
Source§impl ProfileReport
impl ProfileReport
Sourcepub fn new(
data_source: DataSource,
column_profiles: Vec<ColumnProfile>,
execution: ExecutionMetadata,
quality: Option<QualityAssessment>,
) -> Self
pub fn new( data_source: DataSource, column_profiles: Vec<ColumnProfile>, execution: ExecutionMetadata, quality: Option<QualityAssessment>, ) -> Self
Create a new ProfileReport with auto-generated id and timestamp
Sourcepub fn with_semantic_hint_bindings(
self,
bindings: Vec<SemanticHintBinding>,
) -> Self
pub fn with_semantic_hint_bindings( self, bindings: Vec<SemanticHintBinding>, ) -> Self
Attach per-column semantic-hint binding evidence.
Sourcepub fn with_id(self, id: impl Into<String>) -> Self
pub fn with_id(self, id: impl Into<String>) -> Self
Override the auto-generated ID (useful for deterministic caching/testing)
Sourcepub fn with_timestamp(self, timestamp: impl Into<String>) -> Self
pub fn with_timestamp(self, timestamp: impl Into<String>) -> Self
Override the auto-generated timestamp
Sourcepub fn quality_score(&self) -> Option<f64>
pub fn quality_score(&self) -> Option<f64>
Calculate the overall quality score (weighted across the assessed
dimensions). Returns None if quality metrics were not computed, or
if no dimension had anything to assess (e.g. an empty dataset) —
absence of evidence is not a perfect score.
Sourcepub fn source_identifier(&self) -> String
pub fn source_identifier(&self) -> String
Get the data source identifier (for backwards compatibility)
Trait Implementations§
Source§impl Clone for ProfileReport
impl Clone for ProfileReport
Source§fn clone(&self) -> ProfileReport
fn clone(&self) -> ProfileReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProfileReport
impl Debug for ProfileReport
Source§impl<'de> Deserialize<'de> for ProfileReport
Manual deserialization so the schema_version gate runs before any other
field decodes. A derived deserializer visits fields in document order, so
an unsupported future document that also changed structure could fail with
a confusing structural error instead of the actionable version error; by
buffering the document first, the version check always wins.
impl<'de> Deserialize<'de> for ProfileReport
Manual deserialization so the schema_version gate runs before any other
field decodes. A derived deserializer visits fields in document order, so
an unsupported future document that also changed structure could fail with
a confusing structural error instead of the actionable version error; by
buffering the document first, the version check always wins.