pub enum CostSource {
Reported,
RateCard,
Unreported,
}Expand description
Where a cost figure came from.
Ordered by how much it can be trusted, so max over a set of sources gives the weakest link.
Variants§
Reported
The runner reported the figure. The only kind worth billing against.
RateCard
Derived from token counts and a RateCard. An estimate, and labelled as one.
Unreported
The runner reported neither cost nor tokens. The figure is zero and means nothing.
Implementations§
Source§impl CostSource
impl CostSource
Sourcepub fn is_measured(&self) -> bool
pub fn is_measured(&self) -> bool
Returns true when the figure came from the runner itself.
Trait Implementations§
Source§impl Clone for CostSource
impl Clone for CostSource
impl Copy for CostSource
Source§impl Debug for CostSource
impl Debug for CostSource
Source§impl<'de> Deserialize<'de> for CostSource
impl<'de> Deserialize<'de> for CostSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CostSource
Source§impl Ord for CostSource
impl Ord for CostSource
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CostSource
impl PartialEq for CostSource
Source§impl PartialOrd for CostSource
impl PartialOrd for CostSource
Source§impl Serialize for CostSource
impl Serialize for CostSource
impl StructuralPartialEq for CostSource
Auto Trait Implementations§
impl Freeze for CostSource
impl RefUnwindSafe for CostSource
impl Send for CostSource
impl Sync for CostSource
impl Unpin for CostSource
impl UnsafeUnpin for CostSource
impl UnwindSafe for CostSource
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