Skip to main content

MetricSemantics

Struct MetricSemantics 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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§

Source§

impl MetricSemantics

Source

pub fn current() -> Self

The definitions this build measures with.

Trait Implementations§

Source§

impl Clone for MetricSemantics

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MetricSemantics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MetricSemantics

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for MetricSemantics

Source§

impl JsonSchema for MetricSemantics

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for MetricSemantics

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for MetricSemantics

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MetricSemantics

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V