pub enum Quarter {
Q1,
Q2,
Q3,
Q4,
}Expand description
A calendar quarter (Q1-Q4).
Variants§
Implementations§
Source§impl Quarter
impl Quarter
Sourcepub fn first_month(self) -> Month
pub fn first_month(self) -> Month
The starting month of this quarter.
Sourcepub fn last_month(self) -> Month
pub fn last_month(self) -> Month
The ending month of this quarter.
Sourcepub fn from_number(num: u8) -> Option<Self>
pub fn from_number(num: u8) -> Option<Self>
Parse a quarter number (1-4) into a Quarter.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Quarter
impl<'de> Deserialize<'de> for Quarter
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
Source§impl Ord for Quarter
impl Ord for Quarter
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Quarter
impl PartialOrd for Quarter
impl Copy for Quarter
impl Eq for Quarter
impl StructuralPartialEq for Quarter
Auto Trait Implementations§
impl Freeze for Quarter
impl RefUnwindSafe for Quarter
impl Send for Quarter
impl Sync for Quarter
impl Unpin for Quarter
impl UnsafeUnpin for Quarter
impl UnwindSafe for Quarter
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