#[non_exhaustive]pub struct MetricSemantics {
pub text_length_unit: Option<TextLengthUnit>,
pub null_tokens: Option<NullTokenSet>,
pub pattern_match_count: Option<PatternMatchCount>,
pub shape_moments: Option<ShapeMomentEstimator>,
pub range_rule_count: Option<RangeRuleCount>,
pub key_uniqueness_units: Option<KeyUniquenessUnits>,
pub outlier_units: Option<OutlierUnits>,
pub key_column_source: Option<KeyColumnSource>,
}Expand description
How the measurements in a report were defined.
schema_version answers whether a document validates. It cannot answer
whether two valid documents measured the same way: text lengths counted
UTF-8 bytes through 0.11 and count Unicode scalar values since, with no
change to the document’s shape. This records each intentionally changed
definition by name, so a comparison can check exactly the ones both
reports declare.
Every field is optional. A field missing from a stored report means the release that wrote it did not record that definition: unknown, never the current one. Later releases add fields, which older readers ignore.
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.text_length_unit: Option<TextLengthUnit>Unit of min_length, max_length and avg_length on text columns.
Absent means not recorded; an explicit null is malformed, so neither the reader nor the schema accepts one.
null_tokens: Option<NullTokenSet>The text values counted as null, which every null_count and every
completeness figure depend on.
Absent means not recorded: the release that wrote the report counted
only empty, null and nan, or recorded nothing at all.
pattern_match_count: Option<PatternMatchCount>What every pattern’s match_count and match_percentage count.
Absent means not recorded: through 0.12 they counted every regular expression match, validated or not.
shape_moments: Option<ShapeMomentEstimator>The estimator behind every column’s skewness and kurtosis.
Absent means not recorded: through 0.12 both used a form that matches neither the population nor the adjusted estimators.
range_rule_count: Option<RangeRuleCount>What the range and sign rules behind the accuracy score count.
Absent means not recorded: through 0.12 every rule failure counted, over the numeric values of every column.
key_uniqueness_units: Option<KeyUniquenessUnits>What key_uniqueness divides the key’s distinct values by.
Absent means not recorded: through 0.12 it divided by every row, nulls included.
outlier_units: Option<OutlierUnits>What outlier_ratio is measured over.
Absent means not recorded: through 0.12 an untested source read 0 and still assessed accuracy.
key_column_source: Option<KeyColumnSource>Which column key_uniqueness may measure.
Absent means not recorded: through 0.12 the first column with an id-like name was the key when none was declared.
Implementations§
Trait Implementations§
Source§impl Clone for MetricSemantics
impl Clone for MetricSemantics
Source§impl Debug for MetricSemantics
impl Debug for MetricSemantics
Source§impl<'de> Deserialize<'de> for MetricSemantics
impl<'de> Deserialize<'de> for MetricSemantics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MetricSemantics
Source§impl JsonSchema for MetricSemantics
impl JsonSchema for MetricSemantics
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for MetricSemantics
impl PartialEq for MetricSemantics
Source§impl Serialize for MetricSemantics
impl Serialize for MetricSemantics
impl StructuralPartialEq for MetricSemantics
Auto Trait Implementations§
impl Freeze for MetricSemantics
impl RefUnwindSafe for MetricSemantics
impl Send for MetricSemantics
impl Sync for MetricSemantics
impl Unpin for MetricSemantics
impl UnsafeUnpin for MetricSemantics
impl UnwindSafe for MetricSemantics
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.