Skip to main content

GeorefError

Enum GeorefError 

Source
#[non_exhaustive]
pub enum GeorefError {
Show 16 variants MissingEntity { referrer: EntityId, missing: EntityId, }, WrongType { entity: EntityId, expected: &'static str, actual: String, }, MissingAttribute { entity: EntityId, index: usize, name: &'static str, }, AuthoringInvalid { entity: &'static str, attribute: &'static str, value: String, }, InvalidAttribute { entity: EntityId, index: usize, name: &'static str, }, UnsupportedOperation { entity: EntityId, actual: String, }, DegenerateAxis { entity: EntityId, }, InvalidScale { entity: EntityId, value: f64, }, InvalidUnit { entity: EntityId, detail: &'static str, }, UnitCycle { entity: EntityId, }, MissingSchema, AmbiguousSchema { tokens: Vec<String>, }, UnsupportedSchema { token: String, }, MissingProjectFrame, DegenerateProjectFrame, NonFiniteDirection { entity: EntityId, },
}
Expand description

Why a project-to-map operation could not be resolved losslessly.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MissingEntity

An entity referenced another that the model does not contain.

Fields

§referrer: EntityId

The entity holding the dangling reference.

§missing: EntityId

The id that resolved to nothing.

§

WrongType

An entity was not the IFC type the referencing slot requires.

Fields

§entity: EntityId

The entity that was read.

§expected: &'static str

The IFC type the slot requires.

§actual: String

The IFC type actually declared.

§

MissingAttribute

A mandatory attribute was absent, so the value cannot be inferred.

Fields

§entity: EntityId

The entity that was read.

§index: usize

Zero-based slot index of the absent attribute.

§name: &'static str

Schema name of the attribute.

§

AuthoringInvalid

A value supplied to an authoring helper was not acceptable.

Distinct from GeorefError::InvalidAttribute, which names an entity already in the model: at authoring time there is no id yet, so the entity is named by type.

Fields

§entity: &'static str

The entity being authored.

§attribute: &'static str

The attribute at fault.

§value: String

What was supplied.

§

InvalidAttribute

An attribute was present but held the wrong kind of value.

Fields

§entity: EntityId

The entity that was read.

§index: usize

Zero-based slot index of the offending attribute.

§name: &'static str

Schema name of the attribute.

§

UnsupportedOperation

The coordinate operation is a subtype this crate does not resolve.

Refused rather than approximated: a non-projected operation would silently produce wrong map coordinates.

Fields

§entity: EntityId

The coordinate operation entity.

§actual: String

The IFC type actually declared.

§

DegenerateAxis

The map x axis is zero-length or non-finite, so no rotation exists.

Fields

§entity: EntityId

The map conversion entity.

§

InvalidScale

The map scale is zero, negative, or non-finite.

Fields

§entity: EntityId

The map conversion entity.

§value: f64

The rejected scale.

§

InvalidUnit

The map unit is not a length unit this crate can reduce to metres.

Fields

§entity: EntityId

The unit entity.

§detail: &'static str

Which expectation failed.

§

UnitCycle

A unit conversion chain revisited an entity or ran deeper than 16.

Both guards exist: a repeated id catches a true loop, the depth cap catches an unbounded chain of distinct units.

Fields

§entity: EntityId

The unit entity where the walk was abandoned.

§

MissingSchema

The model header declares no FILE_SCHEMA token.

§

AmbiguousSchema

The header declares more than one schema, so the profile is ambiguous.

Refused rather than picking one: the choice changes which coordinate operations are legal.

Fields

§tokens: Vec<String>

Every schema token found in the header.

§

UnsupportedSchema

The declared schema has no projected georeferencing profile here.

IFC2X3 declares no georeferencing entities at all; other tokens may be unrecognised.

Fields

§token: String

The rejected schema token.

§

MissingProjectFrame

Chaining onto a project frame requires that frame to be supplied.

§

DegenerateProjectFrame

The supplied project frame is not an invertible rigid transform.

§

NonFiniteDirection

A direction was zero-length or non-finite, so it cannot be normalised.

Fields

§entity: EntityId

The direction entity.

Trait Implementations§

Source§

impl Clone for GeorefError

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 GeorefError

Source§

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

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

impl Display for GeorefError

Source§

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

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

impl Error for GeorefError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for GeorefError

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 GeorefError

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.