Skip to main content

AlignmentError

Enum AlignmentError 

Source
#[non_exhaustive]
pub enum AlignmentError {
Show 16 variants MissingEntity { entity: EntityId, }, WrongType { entity: EntityId, expected: &'static str, actual: String, }, MissingAttribute { entity: EntityId, index: usize, name: &'static str, }, InvalidAttribute { entity: EntityId, index: usize, name: &'static str, }, InvalidUnits { detail: &'static str, }, InvalidSegment { entity: EntityId, detail: &'static str, }, Unsupported { entity: EntityId, type_name: String, detail: &'static str, }, Graph { detail: String, }, MissingSchema, AmbiguousSchema { tokens: Vec<String>, }, UnsupportedSchema { token: String, }, SemanticViolation { entity: Option<EntityId>, rule: &'static str, }, InvalidAuthoredValue { type_name: &'static str, attribute: &'static str, detail: String, }, ProfileDiscontinuity { entity: EntityId, previous: EntityId, seam: ProfileSeam, expected: f64, actual: f64, }, DanglingReference { entity: EntityId, attribute: &'static str, target: EntityId, }, BudgetExceeded { max_depth: usize, max_nodes: usize, },
}
Expand description

Why an IFC alignment entity could not be read or lowered.

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

A referenced entity id is not present in the model.

Fields

§entity: 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.

§

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.

§

InvalidUnits

The project’s unit assignment does not resolve to usable lengths or angles.

Fields

§detail: &'static str

What expectation failed.

§

InvalidSegment

A horizontal, vertical, or cant segment carries internally inconsistent data.

Fields

§entity: EntityId

The segment entity.

§detail: &'static str

What expectation failed.

§

Unsupported

A segment type or configuration this crate deliberately does not lower.

Covers segment kinds that are legal IFC but lack the data they need in this call (e.g. a VIENNESEBEND lowered without its IfcAlignmentCant layout, its GravityCenterLineHeight, or the station a chained layout supplies) or that have no closed-form neutral curve here (e.g. CUBIC).

Fields

§entity: EntityId

The unsupported entity.

§type_name: String

The IFC type or PredefinedType name actually declared.

§detail: &'static str

Why it is refused rather than approximated.

§

Graph

The assembled neutral alignment graph violates a structural invariant.

Fields

§detail: String

What expectation failed.

§

MissingSchema

The model header declares no FILE_SCHEMA token.

§

AmbiguousSchema

More than one FILE_SCHEMA token was declared.

Fields

§tokens: Vec<String>

Every schema token found in the header.

§

UnsupportedSchema

The declared schema is not one this crate can interpret.

Alignment entities (IfcAlignment*) were introduced in IFC4X3; IFC2X3 and IFC4 ADD2 TC1 do not declare them at all, so there is no version dispatch here the way ifc-resource/ifc-structural have one – exactly one profile is authoritative and anything else is refused.

Fields

§token: String

The rejected schema token.

§

SemanticViolation

A relationship or nesting structure violates a stated invariant.

Fields

§entity: Option<EntityId>

The offending entity, when one could be identified.

§rule: &'static str

The invariant that was violated.

§

InvalidAuthoredValue

An authored value was rejected before anything was staged (ADR 0011).

Distinct from Self::InvalidSegment, which describes a segment that already exists in a file. Here there is no entity yet and therefore no id to report: the caller passed a value that could not be written.

Fields

§type_name: &'static str

The IFC type being authored.

§attribute: &'static str

The attribute whose value was rejected.

§detail: String

Why it cannot be written.

§

ProfileDiscontinuity

Two consecutive vertical segments disagree where they meet.

The segment at entity restates a start height or start gradient that differs from where previous ends, beyond a magnitude-scaled tolerance. A step in height or a kink in grade is refused rather than joined, because joining it would shift every downstream height.

Fields

§entity: EntityId

The segment whose start disagrees.

§previous: EntityId

The segment it follows.

§seam: ProfileSeam

Which quantity is discontinuous.

§expected: f64

The previous segment’s end value, in SI units.

§actual: f64

This segment’s authored start value, in SI units.

§

DanglingReference

A dangling reference: the target id is not present in the model.

Fields

§entity: EntityId

The entity holding the dangling reference.

§attribute: &'static str

The attribute that names the missing target.

§target: EntityId

The id that resolved to nothing.

§

BudgetExceeded

Graph traversal exceeded an explicit depth or node-count bound.

Fields

§max_depth: usize

The configured maximum traversal depth.

§max_nodes: usize

The configured maximum node count.

Trait Implementations§

Source§

impl Clone for AlignmentError

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 AlignmentError

Source§

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

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

impl Display for AlignmentError

Source§

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

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

impl Error for AlignmentError

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 AlignmentError

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 AlignmentError

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.