#[non_exhaustive]pub enum PeriodFreq {
Annual,
Quarterly,
Monthly,
Weekly,
Daily,
Business,
Hourly,
Minutely,
Secondly,
}Expand description
Period frequency code. Matches pandas offset alias core set.
The ordinal axis is frequency-specific: for Monthly, ordinal 0 is a
fixed anchor (pandas uses months since 1970-01). Phase 1 doesn’t
commit to a specific epoch yet — the ordinal scheme is opaque until
Phase 2 wires calendar arithmetic. What Phase 1 DOES nail down is:
same-freq Periods compare + subtract; Period + i64 shifts by n
periods of the declared frequency.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Annual
Y-DEC / A / Y — annual periods.
Quarterly
Q-DEC / Q — quarterly periods.
Monthly
M — monthly periods.
Weekly
W-SUN / W — weekly periods.
Daily
D — daily periods.
Business
B — business-day periods.
Hourly
h / H — hourly periods.
Minutely
min / T — minutely periods.
Secondly
s / S — secondly periods.
Implementations§
Source§impl PeriodFreq
impl PeriodFreq
Sourcepub fn parse(alias: &str) -> Option<Self>
pub fn parse(alias: &str) -> Option<Self>
Parse a pandas-style frequency alias. Recognizes the common subset (Y-DEC/A/Y, Q-DEC/Q, M, W-SUN/W, D, B, h/H, min/T, s/S). Case-insensitive.
Sourcepub const fn resolution(self) -> &'static str
pub const fn resolution(self) -> &'static str
Per br-frankenpandas-qigpe: resolution string for PeriodIndex.resolution.
Trait Implementations§
Source§impl Clone for PeriodFreq
impl Clone for PeriodFreq
Source§fn clone(&self) -> PeriodFreq
fn clone(&self) -> PeriodFreq
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PeriodFreq
Source§impl Debug for PeriodFreq
impl Debug for PeriodFreq
Source§impl<'de> Deserialize<'de> for PeriodFreq
impl<'de> Deserialize<'de> for PeriodFreq
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>,
Source§impl Display for PeriodFreq
impl Display for PeriodFreq
impl Eq for PeriodFreq
Source§impl Hash for PeriodFreq
impl Hash for PeriodFreq
Source§impl Ord for PeriodFreq
impl Ord for PeriodFreq
Source§fn cmp(&self, other: &PeriodFreq) -> Ordering
fn cmp(&self, other: &PeriodFreq) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PeriodFreq
impl PartialEq for PeriodFreq
Source§fn eq(&self, other: &PeriodFreq) -> bool
fn eq(&self, other: &PeriodFreq) -> bool
self and other values to be equal, and is used by ==.