pub struct Cost {
pub total: f64,
pub priced: u64,
pub unpriced: u64,
}Expand description
Running cost for one bucket.
priced and unpriced are counted separately so a bucket whose model has no
configured rate renders as – instead of $0.00.
Fields§
§total: f64§priced: u64Events that carried usage and a configured price.
unpriced: u64Events that carried usage but whose model has no configured price.
Implementations§
Source§impl Cost
impl Cost
Sourcepub fn is_partial(&self) -> bool
pub fn is_partial(&self) -> bool
True when part of this bucket’s spend could not be priced. The total is then a floor, not a total, and must not be printed as if it were one.
Trait Implementations§
impl Copy for Cost
impl StructuralPartialEq for Cost
Auto Trait Implementations§
impl Freeze for Cost
impl RefUnwindSafe for Cost
impl Send for Cost
impl Sync for Cost
impl Unpin for Cost
impl UnsafeUnpin for Cost
impl UnwindSafe for Cost
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