Skip to main content

RefIssueKind

Enum RefIssueKind 

Source
pub enum RefIssueKind {
    Dangling,
    ExternallyDefined,
    ConceptMismatch {
        found: String,
        candidates: Vec<String>,
    },
    VersionMismatch {
        found: String,
        candidates: Vec<String>,
    },
    ObjectVersionMismatch {
        referenced: Option<String>,
        found: Option<String>,
        candidates: Vec<String>,
    },
    TitleMismatch {
        referenced: Option<String>,
        found: String,
    },
    UnknownType,
}
Expand description

The four ways a reference is worth reporting.

Variants§

§

Dangling

No object with that uuid in the package.

Not always an error: an EPC may legitimately reference an object held elsewhere. It is always worth knowing, and it is what breaks a viewer that assumes a package is self-contained.

§

ExternallyDefined

The target is absent, and absence is not evidence of anything: the concept it names is defined in a catalogue Energistics publishes, not in a dataspace.

PropertyKind is the case, and it is not marginal. The dictionary shipped with the standard defines several hundred of them and nothing asks a package to embed the ones it uses - a package of 120 wellbores produced 1 086 of these and not one genuine dangling reference, which is precisely how a real one gets buried.

Whether the uuid is in the dictionary is a different question, and it belongs to the layer that owns the dictionary (energyml_domain::property_kind::Resolver, which energyml check already runs). This variant only says: not being here proves nothing.

§

ConceptMismatch

The target exists but is a different concept - the reference says WellboreInterpretation, the part is a HorizonInterpretation.

Always a real error: whatever reads this will follow the reference and find something it cannot use.

Fields

§found: String

Qualified type of the nearest object found.

§candidates: Vec<String>

The full uri of every object that carries the uuid - none of them is what the reference names. The message built from them reads ’uuid found but type or version should be one of the following: ’ followed by the uris of the objects that carry the right uuid but not the right type or version number. Sorted.

§

VersionMismatch

Same concept, different version - resqml20.obj_Activity naming a resqml22.Activity.

A warning, not an error. A package may mix versions (EPC §3.2), and a reader that matches on uuid finds the right object; but a reader that trusts the declared type to pick a parser does not.

Fields

§found: String

Qualified type of the nearest object found.

§candidates: Vec<String>

The full uri of every object that carries the uuid, sorted.

§

ObjectVersionMismatch

The right object, at another revision: the reference’s ObjectVersion and the object’s objectVersion disagree.

An error when the reference names a revision - one the object is not at, or one where the object carries none: whatever follows it is promised a revision the package does not hold. A warning when the reference names none and the object does: the Identifier Specification has a reader assume the latest, which is what the package holds, so nothing breaks - but a package that stamps every object with a version and writes its references without one says two things, and the Webstudio flags it. It was exactly what our own translation produced, and this checker said nothing.

Fields

§referenced: Option<String>

What the reference says, when it says anything.

§found: Option<String>

What the object carries, when it carries anything. None also when several entries of the uuid and type are held and none is the object - see candidates.

§candidates: Vec<String>

The full uri of every object that carries the uuid, sorted. A reference resolves exactly - by uuid, type and version - and when nothing answers, this is the list a person picks from.

§

TitleMismatch

The right object, under another name: the reference’s cached Title and the object’s citation title disagree.

A warning, never an error: a reader resolves by uuid and finds the right object, so nothing breaks. What it does break is every list built from references rather than from the objects - a graph, a tree, a picker - which then shows a name the package no longer uses, or no name at all. The Webstudio reports it, and this checker did not (seen on a package our own translation wrote: the two references of a LocalEngineeringCompoundCrs carried an empty title).

Fields

§referenced: Option<String>

What the reference calls it, when it calls it anything.

§found: String

What the object calls itself.

§

UnknownType

The reference names a type no schema this build carries defines - well formed (resqml22.NoSuchThing matches the QualifiedType pattern) and pointing at nothing a reader could ever open.

A warning: the pattern accepts any two-digit version, so a package written against a release this build does not carry says the same thing. It is the one reference finding no store can make - it needs the registry of types, which is why it is check_declared_types and not part of check_references.

Trait Implementations§

Source§

impl Clone for RefIssueKind

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 RefIssueKind

Source§

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

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

impl Eq for RefIssueKind

Source§

impl PartialEq for RefIssueKind

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 StructuralPartialEq for RefIssueKind

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<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<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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> 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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more