#[repr(u8)]pub enum Month {
January = 1,
February = 2,
March = 3,
April = 4,
May = 5,
June = 6,
July = 7,
August = 8,
September = 9,
October = 10,
November = 11,
December = 12,
}
Expand description
Months of the year.
Variants§
January = 1
February = 2
March = 3
April = 4
May = 5
June = 6
July = 7
August = 8
September = 9
October = 10
November = 11
December = 12
Implementations§
source§impl Month
impl Month
sourcepub const fn previous(self) -> Self
pub const fn previous(self) -> Self
Get the previous month.
assert_eq!(Month::January.previous(), Month::December);
Runsourcepub const fn next(self) -> Self
pub const fn next(self) -> Self
Get the next month.
assert_eq!(Month::January.next(), Month::February);
RunTrait Implementations§
source§impl PartialEq for Month
impl PartialEq for Month
impl Copy for Month
impl Eq for Month
impl StructuralPartialEq for Month
Auto Trait Implementations§
impl Freeze for Month
impl RefUnwindSafe for Month
impl Send for Month
impl Sync for Month
impl Unpin for Month
impl UnwindSafe for Month
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