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).
Trait Implementations§
Source§impl Clone for CostReport
impl Clone for CostReport
Source§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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.