pub enum Window {
Today,
Last24Hours,
Last7Days,
Last30Days,
Last90Days,
MonthToDate,
AllTime,
}Expand description
A period to total spend over.
Variants§
Today
Since local midnight. Calendar.
Last24Hours
The 24 hours ending now. Rolling.
Last7Days
The 7 days ending now. Rolling.
Last30Days
The 30 days ending now. Rolling.
Last90Days
The 90 days ending now, which is everything retention keeps. Rolling.
MonthToDate
Since local midnight on the first of the current month. Calendar.
AllTime
Everything still on disk.
Implementations§
Source§impl Window
impl Window
Sourcepub const ALL: [Self; 7]
pub const ALL: [Self; 7]
Every window, in the order a dashboard should offer them.
Narrowest first: the question people ask most often is “what is it doing right now”, and the further down the list you read the more you are asking about a trend.
Sourcepub fn is_calendar(self) -> bool
pub fn is_calendar(self) -> bool
Returns true when the window’s start depends on a time zone.
Only calendar windows do. It is worth surfacing, because it decides whether two people comparing dashboards in different places should expect the same number.