pub struct CostWindow {
pub label: &'static str,
pub days: i64,
pub dbus: f64,
pub usd: f64,
pub prior: Option<(f64, f64)>,
}Expand description
Spend over one rolling window ending today.
Fields§
§label: &'static str§days: i64§dbus: f64§usd: f64§prior: Option<(f64, f64)>The same-length window immediately before this one, for a trend.
None when that window predates what usage retains (365 days).
Implementations§
Trait Implementations§
Source§impl Clone for CostWindow
impl Clone for CostWindow
Source§fn clone(&self) -> CostWindow
fn clone(&self) -> CostWindow
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 moreAuto Trait Implementations§
impl Freeze for CostWindow
impl RefUnwindSafe for CostWindow
impl Send for CostWindow
impl Sync for CostWindow
impl Unpin for CostWindow
impl UnsafeUnpin for CostWindow
impl UnwindSafe for CostWindow
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<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 more