pub struct CostReport { /* private fields */ }Expand description
Per-phase attribution for one sandbox, measured or projected.
Holds the rate table it was computed against rather than reaching for the pinned
default, so a report stays readable — and reproducible — after pinned_rates is
updated.
Implementations§
Source§impl CostReport
impl CostReport
Sourcepub fn staleness(&self) -> Option<&str>
pub fn staleness(&self) -> Option<&str>
The staleness warning, when the table was stale at computation time (COST-7).
Carried on the report because the warning has to survive into whatever renders it: a library caller with a log filter and a CLI that only wrote stderr would each lose it on their own.
Sourcepub fn unpriced(&self) -> impl Iterator<Item = &LineItem>
pub fn unpriced(&self) -> impl Iterator<Item = &LineItem>
The line items with no published rate.
Sourcepub fn total(&self) -> Total
pub fn total(&self) -> Total
The total, which is a lower bound whenever anything is unpriced (COST-4).
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
False whenever any phase has no published rate. See Total.
Sourcepub fn fully_measured(&self) -> bool
pub fn fully_measured(&self) -> bool
True only if every duration was timed. An estimate is never this (COST-10).
Source§impl CostReport
impl CostReport
Trait Implementations§
Source§impl Clone for CostReport
impl Clone for CostReport
Source§fn clone(&self) -> CostReport
fn clone(&self) -> CostReport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CostReport
impl Debug for CostReport
impl Eq for CostReport
Source§impl PartialEq for CostReport
impl PartialEq for CostReport
impl StructuralPartialEq for CostReport
Auto Trait Implementations§
impl Freeze for CostReport
impl RefUnwindSafe for CostReport
impl Send for CostReport
impl Sync for CostReport
impl Unpin for CostReport
impl UnsafeUnpin for CostReport
impl UnwindSafe for CostReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.