Skip to main content

SystemAnomaly

Enum SystemAnomaly 

Source
pub enum SystemAnomaly {
    Dangling {
        relation: EntityId,
        missing: EntityId,
    },
    ZoneMemberNotSpatial {
        relation: EntityId,
        zone: EntityId,
        member: EntityId,
        type_name: String,
    },
    ContainedTwice {
        element: EntityId,
        first: EntityId,
        second: EntityId,
    },
    PortAttachedTwice {
        port: EntityId,
        kept: EntityId,
        rejected: EntityId,
    },
    NotAPort {
        relation: EntityId,
        entity: EntityId,
        type_name: String,
    },
    NotASystem {
        relation: EntityId,
        group: EntityId,
        type_name: String,
    },
}
Expand description

A system membership the file states but cannot support.

Anomalies are collected instead of rejected: a file with one broken relationship still has a usable system graph, and refusing the whole model would make the crate useless on real exports.

Variants§

§

Dangling

A relationship names an entity that is not in the file.

Fields

§relation: EntityId

The relationship entity that made the claim.

§missing: EntityId

The id it named.

§

ZoneMemberNotSpatial

An IfcZone member that WR1 does not permit.

WR1 restricts zone members to IfcZone, IfcSpace and IfcSpatialZone. Anything else makes the file invalid, so it is reported and excluded rather than silently listed as zone content.

Fields

§relation: EntityId

The IfcRelAssignsToGroup stating it.

§zone: EntityId

The zone.

§member: EntityId

The member WR1 rejects.

§type_name: String

Its type, for diagnosis.

§

ContainedTwice

An element contained by two different spatial structures.

ContainedInStructure is SET [0:1]: an element has one home. Two cannot both be true, so the first by id wins and the conflict is stated rather than silently resolved.

Fields

§element: EntityId

The element with two homes.

§first: EntityId

The structure kept.

§second: EntityId

The structure rejected.

§

PortAttachedTwice

A port is attached to two different elements.

IfcPort.ContainedIn is SET [0:1] in the schema, so this cannot be expressed by a valid file. It happens when an exporter writes both an IfcRelNests and a legacy IfcRelConnectsPortToElement that disagree. The first attachment in file order is kept so the result stays deterministic, and the conflict is reported rather than hidden.

Fields

§port: EntityId

The port with two owners.

§kept: EntityId

The element that was kept.

§rejected: EntityId

The element that was rejected.

§

NotAPort

A connection names a port that is not an IfcPort subtype.

IfcRelConnectsPorts is typed to IfcPort in the schema, so this is a malformed file rather than a modelling choice.

Fields

§relation: EntityId

The relationship entity.

§entity: EntityId

The entity it named as a port.

§type_name: String

That entity’s declared type, upper-cased.

§

NotASystem

IfcRelAssignsToGroup whose RelatingGroup is not a system.

The relationship is shared with every other kind of group, so a membership may legitimately point at something this crate does not model. It is recorded rather than silently dropped.

Fields

§relation: EntityId

The relationship entity.

§group: EntityId

The group it named.

§type_name: String

The group’s declared type, upper-cased.

Trait Implementations§

Source§

impl Clone for SystemAnomaly

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 SystemAnomaly

Source§

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

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

impl Eq for SystemAnomaly

Source§

impl PartialEq for SystemAnomaly

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 SystemAnomaly

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, 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.