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) -> impl Iterator<Item = CostSchedule<'m>> + '_
pub fn schedules(&self) -> impl Iterator<Item = CostSchedule<'m>> + '_
Every cost schedule in the file.
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