pub struct BudgetVerdict { /* private fields */ }Expand description
A report’s total judged against a Budget.
Implementations§
Source§impl BudgetVerdict
impl BudgetVerdict
Sourcepub fn floor(&self) -> EstimatedUsd
pub fn floor(&self) -> EstimatedUsd
The total’s floor: the whole estimate when Self::is_lower_bound is false.
Sourcepub fn is_lower_bound(&self) -> bool
pub fn is_lower_bound(&self) -> bool
Whether the floor is a lower bound, because a line on the report is unpriced.
Sourcepub fn unpriced_phases(&self) -> &[&'static str]
pub fn unpriced_phases(&self) -> &[&'static str]
The phases whose lines are unpriced, sorted: what the floor leaves out.
Sourcepub fn breached(&self) -> bool
pub fn breached(&self) -> bool
Whether the floor is over the ceiling. At the ceiling is within it.
Sourcepub fn aborts(&self) -> bool
pub fn aborts(&self) -> bool
Whether the caller’s judgement refuses this report: breached, with
OnBreach::Abort.
Sourcepub fn overage(&self) -> Option<EstimatedUsd>
pub fn overage(&self) -> Option<EstimatedUsd>
How far the floor is over the ceiling, when it is: at least this much for a lower bound.
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
One line for a human: the figure, the ceiling, and what an unpriced line leaves open.
An under-budget verdict from a lower bound says so, because “within budget” without that half would be the report lying by omission, the figure COST-4 keeps honest.
Sourcepub fn render_dense(&self) -> String
pub fn render_dense(&self) -> String
The dense line: budget, the ceiling, the basis, breached or within, and the
overage or -.
Trait Implementations§
Source§impl Clone for BudgetVerdict
impl Clone for BudgetVerdict
Source§fn clone(&self) -> BudgetVerdict
fn clone(&self) -> BudgetVerdict
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BudgetVerdict
impl Debug for BudgetVerdict
impl Eq for BudgetVerdict
Source§impl PartialEq for BudgetVerdict
impl PartialEq for BudgetVerdict
impl StructuralPartialEq for BudgetVerdict
Auto Trait Implementations§
impl Freeze for BudgetVerdict
impl RefUnwindSafe for BudgetVerdict
impl Send for BudgetVerdict
impl Sync for BudgetVerdict
impl Unpin for BudgetVerdict
impl UnsafeUnpin for BudgetVerdict
impl UnwindSafe for BudgetVerdict
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
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
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> ⓘ
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> ⓘ
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 more