pub enum CostWindow {
Today,
Last24h,
Last7d,
Last30d,
MonthToDate,
Last90d,
AllTime,
}Expand description
A period to report over.
Two kinds, and the difference matters. today and month_to_date are calendar windows: they
begin at local midnight, so which instant that is depends on the Tower’s time zone. The
rest are rolling: a fixed number of hours ending now, identical everywhere.
Conflating the two is not theoretical. Gating spend on a UTC day boundary while reporting the ledger in local time lets a factory spend one day’s money twice, and the bug is invisible until it matters.
Variants§
Today
today
Last24h
last_24h
Last7d
last_7d
Last30d
last_30d
MonthToDate
month_to_date
Last90d
last_90d
AllTime
all_time
Trait Implementations§
Source§impl Clone for CostWindow
impl Clone for CostWindow
impl Copy for CostWindow
Source§impl Debug for CostWindow
impl Debug for CostWindow
Source§impl<'de> Deserialize<'de> for CostWindow
impl<'de> Deserialize<'de> for CostWindow
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 CostWindow
Source§impl PartialEq for CostWindow
impl PartialEq for CostWindow
Source§impl Serialize for CostWindow
impl Serialize for CostWindow
impl StructuralPartialEq for CostWindow
Auto 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