Skip to main content

ClassificationView

Struct ClassificationView 

Source
pub struct ClassificationView<'m> { /* private fields */ }
Expand description

Entry point for classification/document/library queries over a borrowed Model.

Every projection the view hands out reads against the release the model’s header declares (see crate::classification_schema).

Implementations§

Source§

impl<'m> ClassificationView<'m>

Source

pub fn classification_assignments( self, ) -> impl Iterator<Item = ClassificationAssignment<'m>> + 'm

All IfcRelAssociatesClassification instances in the model.

Source

pub fn classification_assignments_for( self, object: EntityId, ) -> ClassificationResult<Vec<ClassificationAssignment<'m>>>

Classification assignments naming object among their RelatedObjects, with the relating classification checked against IfcClassificationSelect; fails if object is unknown or a reference does not resolve.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn document_assignments( self, ) -> impl Iterator<Item = DocumentAssignment<'m>> + 'm

All IfcRelAssociatesDocument instances in the model.

Source

pub fn document_assignments_for( self, object: EntityId, ) -> ClassificationResult<Vec<DocumentAssignment<'m>>>

Document assignments naming object among their RelatedObjects, with the relating document checked against IfcDocumentSelect; fails if object is unknown or a reference does not resolve.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn library_assignments( self, ) -> impl Iterator<Item = LibraryAssignment<'m>> + 'm

All IfcRelAssociatesLibrary instances in the model.

Source

pub fn library_assignments_for( self, object: EntityId, ) -> ClassificationResult<Vec<LibraryAssignment<'m>>>

Library assignments naming object among their RelatedObjects, with the relating library checked against IfcLibrarySelect; fails if object is unknown or a reference does not resolve.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn notations(self) -> impl Iterator<Item = ClassificationNotation<'m>> + 'm

All IfcClassificationNotation instances in the model (IFC2X3 only).

Source

pub fn notation( self, id: EntityId, ) -> ClassificationResult<ClassificationNotation<'m>>

Strictly project the IfcClassificationNotation id.

§Errors

UnknownEntity, WrongEntityType, or NotInSchema when the bound release (IFC4) does not define notations.

Source

pub fn notation_values(self, id: EntityId) -> ClassificationResult<Vec<&'m str>>

The notation’s code: each facet’s NotationValue, in file order.

§Errors

Those of Self::notation, plus a dangling facet, a facet that is not an IfcClassificationNotationFacet, or a facet without a value.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn references( self, ) -> impl Iterator<Item = ClassificationReference<'m>> + 'm

All IfcClassificationReference instances in the model.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn systems(self) -> impl Iterator<Item = ClassificationSystem<'m>> + 'm

All IfcClassification instances in the model.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn documents(self) -> impl Iterator<Item = DocumentInformation<'m>> + 'm

All IfcDocumentInformation instances in the model.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn document_references( self, ) -> impl Iterator<Item = DocumentReference<'m>> + 'm

All IfcDocumentReference instances in the model.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn external_reference_relationship( self, id: EntityId, ) -> ClassificationResult<ExternalReferenceRelationship<'m>>

Strictly project one generic external-reference relationship.

Source

pub fn external_reference_relationships( self, ) -> impl Iterator<Item = ExternalReferenceRelationship<'m>> + 'm

All generic external-reference relationships in deterministic model order.

Source

pub fn external_references_for( self, resource: EntityId, ) -> ClassificationResult<Vec<ExternalReferenceRelationship<'m>>>

Valid external-reference relationships naming a particular resource.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn libraries(self) -> impl Iterator<Item = LibraryInformation<'m>> + 'm

All IfcLibraryInformation instances in the model.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn library_references( self, ) -> impl Iterator<Item = LibraryReference<'m>> + 'm

All IfcLibraryReference instances in the model.

Source§

impl<'m> ClassificationView<'m>

Source

pub fn hierarchy_from( self, leaf: EntityId, budget: Budget, ) -> ClassificationResult<ClassificationHierarchy<'m>>

Walk ReferencedSource links from leaf up to its root, stopping at the enclosing IfcClassification if present; fails on a cycle, a dangling or mistyped source, or if the walk exceeds budget.

Every distinct entity resolved counts against budget.max_nodes, including the final IfcClassification, and every ReferencedSource edge followed against budget.max_depth. Reaching an entity already on the path is reported as ClassificationError::Cycle, never as a budget error.

Source

pub fn children_of( self, source: EntityId, ) -> ClassificationResult<Vec<ClassificationReference<'m>>>

IfcClassificationReference instances whose ReferencedSource is source, sorted by id; fails if source is unknown or is not itself a classification or reference.

Source

pub fn effective_classifications( self, object: EntityId, ) -> ClassificationResult<EffectiveClassifications<'m>>

Direct classification assignments on object, plus any inherited from its unambiguous IfcRelDefinesByType type; fails if object is unknown, has an assignment with an invalid relating classification, or is related to more than one type.

Source§

impl<'m> ClassificationView<'m>

Source

pub const fn new(model: &'m Model) -> Self

Borrow model for classification-schema queries.

Trait Implementations§

Source§

impl<'m> Clone for ClassificationView<'m>

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<'m> Copy for ClassificationView<'m>

Source§

impl<'m> Debug for ClassificationView<'m>

Source§

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

Formats the value using the given formatter. Read more

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.