Skip to main content

openbim_core/
lib.rs

1//! `openbim-core` — the vocabulary every openBIM standard shares.
2//!
3//! # What belongs here
4//!
5//! **Domain** concepts used by more than one standard — not XML, not ZIP.
6//! Encoding substrate lives in `openbim-codec-xml` / `openbim-codec-zip`, one layer below, so
7//! that `packages/` can use it too without ever depending on `openbim/`.
8//!
9//! Three things earn their place:
10//!
11//! - [`Outcome`] — the applicable/not-applicable trichotomy. IDS *produces*
12//!   it, BCF *consumes* it. Defined once so the two agree.
13//! - [`ElementRef`] — "this element, in this document". BCF viewpoints and
14//!   ICDD linksets are both cross-document references and would otherwise
15//!   invent incompatible shapes for the same idea.
16//! - [`Detected`] — a version *and how it was determined*, including explicit
17//!   disagreement.
18//!
19//! If something is needed by exactly one standard, it belongs in that
20//! standard's crate instead. If this crate ever holds only re-exports of
21//! `wire-*`, delete it — that would prove there was no shared domain.
22//!
23//! # Status
24//!
25//! **Scaffold.** The types here are real and tested, but no standard is
26//! implemented yet. This crate is published so the `openbim-*` name family is
27//! coherent from the first release.
28
29#![forbid(unsafe_code)]
30
31pub mod detected;
32pub mod element_ref;
33pub mod outcome;
34
35pub use detected::Detected;
36pub use element_ref::ElementRef;
37pub use outcome::Outcome;