ifc-approval
Bounded IFC4 approval resource semantics.
| Status | Implemented |
| Latest release | 0.3.0 (2026-09-29) |
| Registries | crates.io ifc-approval |
| Via the facade | openbim-ifc feature approval |
| API documentation | rustdoc · docs.rs |
| Source | crates/ifc-approval/ |
Overview
Bounded approval-resource views and transaction-staged authoring.
This crate owns IfcApproval, its resource-level relationships, and IfcRelAssociatesApproval, read and written in the model's declared release (IFC2X3, IFC4 or IFC4X3) by attribute name. It validates selected WHERE/SELECT rules but does not implement workflow, authorization, signatures, or policy decisions.
Depends on
Changes
Latest release, 0.3.0 (2026-09-29):
Added
DateTimeInput: an approval time as IFC4/IFC4X3IfcDateTimetext or an IFC2X3IfcDateTimeSelectrecord (From<&str>,From<EntityId>).ApprovalError::NotInSchema,StructuredValue,EntityNotInSchema,AuthoringNotInSchemaandAuthoringValueType, and projections'release().SchemaVersionis re-exported.
Changed (breaking)
The approval views read every attribute by name in the model's declared release (#212). They read the IFC4 positions from every file, so an IFC2X3
IfcApprovalanswered its description as the identifier and its date record as the name, and an IFC2X3IfcApprovalRelationshipswapped its ends.ApprovalViewbinds the header (IFC2X3, IFC4 or IFC4X3; none reads as IFC4) and a lookup refuses IFC4X1, IFC4X2, unknown and multiple schemas. An attribute the release does not declare isNotInSchema(IFC2X3IfcApprovalhas noRequestingApproval,GivingApproval, orStatus,LevelandQualifierunder those names, which are not documented as itsApprovalStatus,ApprovalLevelandApprovalQualifier), andtime_of_approvalon IFC2X3'sApprovalDateTimerecord isStructuredValuewith the record id. IFC2X3RelatedApprovalis read as a one-elementrelated_approvals. IFC4 and IFC4X3 answers are unchanged.create_approval,relate_approvalsandrelate_resource_approvalbind the declared release and lay their records out by name (#212). In IFC2X3 anIfcApprovalhas seven attributes and requiresIdentifier,NameandApprovalDateTime(the IFC4TimeOfApproval) as a date record; anIfcApprovalRelationshiptakes exactly one related approval and requiresName;IfcResourceApprovalRelationshipdoes not exist (EntityNotInSchema). A value the release does not declare isAuthoringNotInSchema(formerlyAuthoringInvalid) and one it cannot holdAuthoringValueType. IFC4 and IFC4X3 records are unchanged.ApprovalDraft::time_of_approvalisOption<DateTimeInput>; the setter takesimpl Into<DateTimeInput>, so.time_of_approval("…")still compiles.Approval::try_new,ApprovalRelationship::try_new,ResourceApprovalRelationship::try_newandApprovalAssignment::try_newtake theSchemaVersionto read against, refusing IFC4X1, IFC4X2 and an entity the release does not declare.ApprovalView::newis no longerconst.ApprovalDraft,ApprovalRelationshipDraft,ResourceApprovalDraftandApprovalAssociationDraftare#[non_exhaustive](#214). Struct literals no longer compile outside the crate: build them withApprovalDraft::new(),ApprovalRelationshipDraft::new(relating_approval, related_approvals),ResourceApprovalDraft::new(related_resources, relating_approval)andApprovalAssociationDraft::new(global_id, related_objects, relating_approval)plus field-named setters. Fields stay public.
Changed
- Depends on
ifc-schemawith its default features named explicitly (every bundled release), now that the workspace dependency turns them off for the facade's per-release features (#112). - A model whose header declares
IFC4X1orIFC4X2is refused with the existing unsupported-schema error.ifc-schemanow bundles both releases, but no layout here is verified against them, so they are never read as IFC4 or IFC4X3.
Full history: crates/ifc-approval/CHANGELOG.md