pub struct CostView<'m> { /* private fields */ }Expand description
A borrowed cost interpretation of a model.
Implementations§
Source§impl<'m> CostView<'m>
impl<'m> CostView<'m>
Sourcepub fn schedules(
&self,
) -> Result<impl Iterator<Item = CostSchedule<'m>> + '_, CostError>
pub fn schedules( &self, ) -> Result<impl Iterator<Item = CostSchedule<'m>> + '_, CostError>
Every cost schedule in the file, read against the model’s declared release (#212).
§Errors
CostError::UnsupportedSchema when the header declares a release
the cost readers are not verified against (IFC4X1, IFC4X2 or an
unknown token), CostError::MultipleSchemas when it declares
several. A header with no schema reads as IFC4.
Sourcepub fn model(&self) -> &'m Model
pub fn model(&self) -> &'m Model
The model underneath, for callers that need to resolve references.
Sourcepub fn values_of(&self, item: &CostItem<'m>) -> Vec<CostValue<'m>>
pub fn values_of(&self, item: &CostItem<'m>) -> Vec<CostValue<'m>>
Resolve the cost values attached to an item.
A reference that does not resolve is skipped rather than erroring:
dangling references are common in real files, and one bad link should
not make the whole cost tree unreadable. Use
Model::dangling_references when you need to know about them.
Trait Implementations§
Auto Trait Implementations§
impl<'m> !RefUnwindSafe for CostView<'m>
impl<'m> !UnwindSafe for CostView<'m>
impl<'m> Freeze for CostView<'m>
impl<'m> Send for CostView<'m>
impl<'m> Sync for CostView<'m>
impl<'m> Unpin for CostView<'m>
impl<'m> UnsafeUnpin for CostView<'m>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more