ifc_resource/inventory/mod.rs
1//! Inventory capability: `IfcInventory` metadata and group membership.
2//!
3//! ## Internal split
4//!
5//! - `definition.rs`: inventory metadata.
6//! - `items.rs`: contained asset links.
7
8mod definition;
9mod items;
10
11use crate::error::ResourceResult;
12use crate::view::ResourceView;
13use ifc_model::EntityId;
14
15pub use definition::Inventory;
16
17impl<'m, 's> ResourceView<'m, 's> {
18 /// Projects an `IfcInventory` by entity id.
19 pub fn inventory(&self, id: EntityId) -> ResourceResult<Inventory<'m, 's>> {
20 Inventory::from_record(self.record(id, "IfcInventory")?)
21 }
22}