pub enum PeriodSlot {
Q1,
Q2,
Q3,
Q4,
FY,
H1,
H2,
M3,
M6,
M9,
M12,
}Expand description
Canonical period-slot categories parsed from raw fiscal-period labels.
This enum is intentionally source-format agnostic: multiple token styles map into the small stable set used by filtering and trend ranking.
Recognised aliases:
- Quarters:
Q1..Q4 - Annual:
FY,ANNUAL - Semi-annual:
H1/H2,HY1/HY2,SA1/SA2,S1/S2 - Month windows:
3M,6M,9M,12M
Variants§
Implementations§
Source§impl PeriodSlot
impl PeriodSlot
Sourcepub fn normalized_quarter(self) -> i64
pub fn normalized_quarter(self) -> i64
Maps the slot to a normalised quarter-space rank (1..=4).
Higher rank = later in the fiscal year. Sort descending on this value to get newest-first row ordering.
| Rank | Slots |
|---|---|
| 4 | Q4, FY, H2, 12M |
| 3 | Q3, 9M |
| 2 | Q2, H1, 6M |
| 1 | Q1, 3M |
Trait Implementations§
Source§impl Clone for PeriodSlot
impl Clone for PeriodSlot
Source§fn clone(&self) -> PeriodSlot
fn clone(&self) -> PeriodSlot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PeriodSlot
impl Debug for PeriodSlot
Source§impl PartialEq for PeriodSlot
impl PartialEq for PeriodSlot
impl Copy for PeriodSlot
impl Eq for PeriodSlot
impl StructuralPartialEq for PeriodSlot
Auto Trait Implementations§
impl Freeze for PeriodSlot
impl RefUnwindSafe for PeriodSlot
impl Send for PeriodSlot
impl Sync for PeriodSlot
impl Unpin for PeriodSlot
impl UnsafeUnpin for PeriodSlot
impl UnwindSafe for PeriodSlot
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