#[non_exhaustive]pub struct SemanticHints {
pub positive_columns: Vec<String>,
pub identifier_columns: Vec<String>,
pub temporal_columns: Vec<String>,
}Expand description
User-supplied semantic hints that affect profiling and quality metrics.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.positive_columns: Vec<String>§identifier_columns: Vec<String>§temporal_columns: Vec<String>Implementations§
Source§impl SemanticHints
impl SemanticHints
pub fn new( positive_columns: Vec<String>, identifier_columns: Vec<String>, ) -> SemanticHints
pub fn with_temporal_columns( self, temporal_columns: Vec<String>, ) -> SemanticHints
pub fn is_empty(&self) -> bool
pub fn is_identifier_column(&self, column_name: &str) -> bool
pub fn is_positive_column(&self, column_name: &str) -> bool
pub fn is_temporal_column(&self, column_name: &str) -> bool
Sourcepub fn iter(&self) -> impl Iterator<Item = (SemanticHintKind, &str)>
pub fn iter(&self) -> impl Iterator<Item = (SemanticHintKind, &str)>
Every (kind, column_name) pair across all three hint lists.
Sourcepub fn validate_names(
&self,
column_names: &[&str],
) -> Result<(), DataProfilerError>
pub fn validate_names( &self, column_names: &[&str], ) -> Result<(), DataProfilerError>
Fail loudly when a hint names a column that is not in the schema.
A hint is the user’s chosen alternative to overconfident inference, so a hint that cannot bind must not vanish: a typo’d or stale column name is a mistake the profiler should surface, not silently discard.
Sourcepub fn validate_quality_usage(
&self,
quality_computed: bool,
) -> Result<(), DataProfilerError>
pub fn validate_quality_usage( &self, quality_computed: bool, ) -> Result<(), DataProfilerError>
Reject value-driven hints when the Quality metric pack did not run.
Positive and temporal hints only affect quality calculators. Accepting them without a quality assessment would make the configuration look effective while producing neither metrics nor binding evidence.
Sourcepub fn validate_bindings(
&self,
bindings: &[SemanticHintBinding],
) -> Result<(), DataProfilerError>
pub fn validate_bindings( &self, bindings: &[SemanticHintBinding], ) -> Result<(), DataProfilerError>
Fail loudly when a hint names a real column but bound to nothing.
Only bindings that were assessed over the full data
(SemanticHintBinding::is_proven_inert) raise; sampled evidence is
carried in the report but never treated as proof of absence.
Trait Implementations§
Source§impl Clone for SemanticHints
impl Clone for SemanticHints
Source§fn clone(&self) -> SemanticHints
fn clone(&self) -> SemanticHints
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 SemanticHints
impl Debug for SemanticHints
Source§impl Default for SemanticHints
impl Default for SemanticHints
Source§fn default() -> SemanticHints
fn default() -> SemanticHints
impl Eq for SemanticHints
Source§impl PartialEq for SemanticHints
impl PartialEq for SemanticHints
impl StructuralPartialEq for SemanticHints
Auto Trait Implementations§
impl Freeze for SemanticHints
impl RefUnwindSafe for SemanticHints
impl Send for SemanticHints
impl Sync for SemanticHints
impl Unpin for SemanticHints
impl UnsafeUnpin for SemanticHints
impl UnwindSafe for SemanticHints
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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