Enum nichi::Month

source ·
#[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

Month in a 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

source

pub const FIRST: Month = Month::January

assert_eq!(Month::FIRST, Month::January);
source

pub const LAST: Month = Month::December

assert_eq!(Month::LAST, Month::December);
source

pub const ALL: [Month; 12] = _

assert_eq!(Month::ALL[0],  Month::January);
assert_eq!(Month::ALL[1],  Month::February);
assert_eq!(Month::ALL[2],  Month::March);
assert_eq!(Month::ALL[3],  Month::April);
assert_eq!(Month::ALL[4],  Month::May);
assert_eq!(Month::ALL[5],  Month::June);
assert_eq!(Month::ALL[6],  Month::July);
assert_eq!(Month::ALL[7],  Month::August);
assert_eq!(Month::ALL[8],  Month::September);
assert_eq!(Month::ALL[9],  Month::October);
assert_eq!(Month::ALL[10], Month::November);
assert_eq!(Month::ALL[11], Month::December);
source

pub const fn new(month: u8) -> Self

assert_eq!(Month::new(1),  Month::January);
assert_eq!(Month::new(2),  Month::February);
assert_eq!(Month::new(3),  Month::March);
assert_eq!(Month::new(4),  Month::April);
assert_eq!(Month::new(5),  Month::May);
assert_eq!(Month::new(6),  Month::June);
assert_eq!(Month::new(7),  Month::July);
assert_eq!(Month::new(8),  Month::August);
assert_eq!(Month::new(9),  Month::September);
assert_eq!(Month::new(10), Month::October);
assert_eq!(Month::new(11), Month::November);
assert_eq!(Month::new(12), Month::December);
Month::new(0);
Month::new(13);
source

pub const fn new_saturating(month: u8) -> Self

assert_eq!(Month::new_saturating(1),  Month::January);
assert_eq!(Month::new_saturating(2),  Month::February);
assert_eq!(Month::new_saturating(3),  Month::March);
assert_eq!(Month::new_saturating(4),  Month::April);
assert_eq!(Month::new_saturating(5),  Month::May);
assert_eq!(Month::new_saturating(6),  Month::June);
assert_eq!(Month::new_saturating(7),  Month::July);
assert_eq!(Month::new_saturating(8),  Month::August);
assert_eq!(Month::new_saturating(9),  Month::September);
assert_eq!(Month::new_saturating(10), Month::October);
assert_eq!(Month::new_saturating(11), Month::November);
assert_eq!(Month::new_saturating(12), Month::December);
assert_eq!(Month::new_saturating(0), Month::January);
assert_eq!(Month::new_saturating(13), Month::December);
assert_eq!(Month::new_saturating(14), Month::December);
source

pub const fn new_wrapping(month: u8) -> Self

// Wraps to December
assert_eq!(Month::new_wrapping(0),  Month::December);

assert_eq!(Month::new_wrapping(1),  Month::January);
assert_eq!(Month::new_wrapping(2),  Month::February);
assert_eq!(Month::new_wrapping(3),  Month::March);
assert_eq!(Month::new_wrapping(4),  Month::April);
assert_eq!(Month::new_wrapping(5),  Month::May);
assert_eq!(Month::new_wrapping(6),  Month::June);
assert_eq!(Month::new_wrapping(7),  Month::July);
assert_eq!(Month::new_wrapping(8),  Month::August);
assert_eq!(Month::new_wrapping(9),  Month::September);
assert_eq!(Month::new_wrapping(10), Month::October);
assert_eq!(Month::new_wrapping(11), Month::November);
assert_eq!(Month::new_wrapping(12), Month::December);

// Wraps to January, February, etc
assert_eq!(Month::new_wrapping(13), Month::January);
assert_eq!(Month::new_wrapping(14), Month::February);
assert_eq!(Month::new_wrapping(15), Month::March);
assert_eq!(Month::new_wrapping(16), Month::April);
assert_eq!(Month::new_wrapping(17), Month::May);
assert_eq!(Month::new_wrapping(18), Month::June);
assert_eq!(Month::new_wrapping(19), Month::July);
assert_eq!(Month::new_wrapping(20), Month::August);
assert_eq!(Month::new_wrapping(21), Month::September);
assert_eq!(Month::new_wrapping(22), Month::October);
assert_eq!(Month::new_wrapping(23), Month::November);
assert_eq!(Month::new_wrapping(24), Month::December);
source

pub const fn as_u8(self) -> u8

Turn Self into its u8 representation

source

pub const fn next_saturating(self) -> Self

Get the next Self, saturating if we’re at Self::LAST

source

pub const fn next_wrapping(self) -> Self

Get the next Self, wrapping if we’re at Self::LAST

source

pub const fn previous_saturating(self) -> Self

Get the previous Self, saturating if we’re at Self::FIRST

source

pub const fn previous_wrapping(self) -> Self

Get the previous Self, wrapping if we’re at Self::FIRST

source

pub const fn add_saturating(self, rhs: u8) -> Self

Add onto Self, saturating if we’re at Self::LAST

source

pub const fn sub_saturating(self, rhs: u8) -> Self

Subtract from Self, saturating if we’re at Self::FIRST

source

pub const fn add_wrapping(self, rhs: u8) -> Self

Add onto Self, wrapping if we’re at Self::LAST

source

pub const fn sub_wrapping(self, rhs: u8) -> Self

Subtract from Self, wrapping if we’re at Self::FIRST

source

pub const fn as_str(self) -> &'static str

assert_eq!(Month::January.as_str(),   "January");
assert_eq!(Month::February.as_str(),  "February");
assert_eq!(Month::March.as_str(),     "March");
assert_eq!(Month::April.as_str(),     "April");
assert_eq!(Month::May.as_str(),       "May");
assert_eq!(Month::June.as_str(),      "June");
assert_eq!(Month::July.as_str(),      "July");
assert_eq!(Month::August.as_str(),    "August");
assert_eq!(Month::September.as_str(), "September");
assert_eq!(Month::October.as_str(),   "October");
assert_eq!(Month::November.as_str(),  "November");
assert_eq!(Month::December.as_str(),  "December");
source

pub const fn as_str_lower(self) -> &'static str

assert_eq!(Month::January.as_str_lower(),   "january");
assert_eq!(Month::February.as_str_lower(),  "february");
assert_eq!(Month::March.as_str_lower(),     "march");
assert_eq!(Month::April.as_str_lower(),     "april");
assert_eq!(Month::May.as_str_lower(),       "may");
assert_eq!(Month::June.as_str_lower(),      "june");
assert_eq!(Month::July.as_str_lower(),      "july");
assert_eq!(Month::August.as_str_lower(),    "august");
assert_eq!(Month::September.as_str_lower(), "september");
assert_eq!(Month::October.as_str_lower(),   "october");
assert_eq!(Month::November.as_str_lower(),  "november");
assert_eq!(Month::December.as_str_lower(),  "december");
source

pub const fn as_str_upper(self) -> &'static str

assert_eq!(Month::January.as_str_upper(),   "JANUARY");
assert_eq!(Month::February.as_str_upper(),  "FEBRUARY");
assert_eq!(Month::March.as_str_upper(),     "MARCH");
assert_eq!(Month::April.as_str_upper(),     "APRIL");
assert_eq!(Month::May.as_str_upper(),       "MAY");
assert_eq!(Month::June.as_str_upper(),      "JUNE");
assert_eq!(Month::July.as_str_upper(),      "JULY");
assert_eq!(Month::August.as_str_upper(),    "AUGUST");
assert_eq!(Month::September.as_str_upper(), "SEPTEMBER");
assert_eq!(Month::October.as_str_upper(),   "OCTOBER");
assert_eq!(Month::November.as_str_upper(),  "NOVEMBER");
assert_eq!(Month::December.as_str_upper(),  "DECEMBER");
source

pub const fn as_str_short(self) -> &'static str

assert_eq!(Month::January.as_str_short(),   "Jan");
assert_eq!(Month::February.as_str_short(),  "Feb");
assert_eq!(Month::March.as_str_short(),     "Mar");
assert_eq!(Month::April.as_str_short(),     "Apr");
assert_eq!(Month::May.as_str_short(),       "May");
assert_eq!(Month::June.as_str_short(),      "Jun");
assert_eq!(Month::July.as_str_short(),      "Jul");
assert_eq!(Month::August.as_str_short(),    "Aug");
assert_eq!(Month::September.as_str_short(), "Sep");
assert_eq!(Month::October.as_str_short(),   "Oct");
assert_eq!(Month::November.as_str_short(),  "Nov");
assert_eq!(Month::December.as_str_short(),  "Dec");
source

pub const fn as_str_short_lower(self) -> &'static str

assert_eq!(Month::January.as_str_short_lower(),   "jan");
assert_eq!(Month::February.as_str_short_lower(),  "feb");
assert_eq!(Month::March.as_str_short_lower(),     "mar");
assert_eq!(Month::April.as_str_short_lower(),     "apr");
assert_eq!(Month::May.as_str_short_lower(),       "may");
assert_eq!(Month::June.as_str_short_lower(),      "jun");
assert_eq!(Month::July.as_str_short_lower(),      "jul");
assert_eq!(Month::August.as_str_short_lower(),    "aug");
assert_eq!(Month::September.as_str_short_lower(), "sep");
assert_eq!(Month::October.as_str_short_lower(),   "oct");
assert_eq!(Month::November.as_str_short_lower(),  "nov");
assert_eq!(Month::December.as_str_short_lower(),  "dec");
source

pub const fn as_str_short_upper(self) -> &'static str

assert_eq!(Month::January.as_str_short_upper(),   "JAN");
assert_eq!(Month::February.as_str_short_upper(),  "FEB");
assert_eq!(Month::March.as_str_short_upper(),     "MAR");
assert_eq!(Month::April.as_str_short_upper(),     "APR");
assert_eq!(Month::May.as_str_short_upper(),       "MAY");
assert_eq!(Month::June.as_str_short_upper(),      "JUN");
assert_eq!(Month::July.as_str_short_upper(),      "JUL");
assert_eq!(Month::August.as_str_short_upper(),    "AUG");
assert_eq!(Month::September.as_str_short_upper(), "SEP");
assert_eq!(Month::October.as_str_short_upper(),   "OCT");
assert_eq!(Month::November.as_str_short_upper(),  "NOV");
assert_eq!(Month::December.as_str_short_upper(),  "DEC");
source

pub const fn as_str_num(self) -> &'static str

assert_eq!(Month::January.as_str_num(),   "1");
assert_eq!(Month::February.as_str_num(),  "2");
assert_eq!(Month::March.as_str_num(),     "3");
assert_eq!(Month::April.as_str_num(),     "4");
assert_eq!(Month::May.as_str_num(),       "5");
assert_eq!(Month::June.as_str_num(),      "6");
assert_eq!(Month::July.as_str_num(),      "7");
assert_eq!(Month::August.as_str_num(),    "8");
assert_eq!(Month::September.as_str_num(), "9");
assert_eq!(Month::October.as_str_num(),   "10");
assert_eq!(Month::November.as_str_num(),  "11");
assert_eq!(Month::December.as_str_num(),  "12");
source

pub const fn as_str_jp(self) -> &'static str

assert_eq!(Month::January.as_str_jp(),   "一月");
assert_eq!(Month::February.as_str_jp(),  "二月");
assert_eq!(Month::March.as_str_jp(),     "三月");
assert_eq!(Month::April.as_str_jp(),     "四月");
assert_eq!(Month::May.as_str_jp(),       "五月");
assert_eq!(Month::June.as_str_jp(),      "六月");
assert_eq!(Month::July.as_str_jp(),      "七月");
assert_eq!(Month::August.as_str_jp(),    "八月");
assert_eq!(Month::September.as_str_jp(), "九月");
assert_eq!(Month::October.as_str_jp(),   "十月");
assert_eq!(Month::November.as_str_jp(),  "十一月");
assert_eq!(Month::December.as_str_jp(),  "十二月");
source

pub const fn from_str(s: &str) -> Option<Self>

Create a [Weekday] by parsing a &str

A valid input string can either be the first 3 letters of the day (returned from [Weekday::as_str_short]) or the full weekday (returned from [Weekday::as_str]).

These cases are covered:

  • lowercase
  • UPPERCASE

For example:

assert_eq!(Weekday::from_str("SUN").unwrap(),    Weekday::Sunday);
assert_eq!(Weekday::from_str("Sun").unwrap(),    Weekday::Sunday);
assert_eq!(Weekday::from_str("sun").unwrap(),    Weekday::Sunday);
assert_eq!(Weekday::from_str("SUNDAY").unwrap(), Weekday::Sunday);
assert_eq!(Weekday::from_str("Sunday").unwrap(), Weekday::Sunday);
assert_eq!(Weekday::from_str("sunday").unwrap(), Weekday::Sunday);
None

If:

  • s.len() > 9
  • The string could not be parsed then this function will return None.

(and all case-combinations).

Examples
assert_eq!(Month::from_str("1").unwrap(),         Month::January);
assert_eq!(Month::from_str("January").unwrap(),   Month::January);
assert_eq!(Month::from_str("january").unwrap(),   Month::January);
assert_eq!(Month::from_str("JANUARY").unwrap(),   Month::January);
assert_eq!(Month::from_str("Jan").unwrap(),       Month::January);
assert_eq!(Month::from_str("jan").unwrap(),       Month::January);
assert_eq!(Month::from_str("JAN").unwrap(),       Month::January);
assert_eq!(Month::from_str("2").unwrap(),         Month::February);
assert_eq!(Month::from_str("February").unwrap(),  Month::February);
assert_eq!(Month::from_str("february").unwrap(),  Month::February);
assert_eq!(Month::from_str("FEBRUARY").unwrap(),  Month::February);
assert_eq!(Month::from_str("Feb").unwrap(),       Month::February);
assert_eq!(Month::from_str("feb").unwrap(),       Month::February);
assert_eq!(Month::from_str("FEB").unwrap(),       Month::February);
assert_eq!(Month::from_str("3").unwrap(),         Month::March);
assert_eq!(Month::from_str("March").unwrap(),     Month::March);
assert_eq!(Month::from_str("march").unwrap(),     Month::March);
assert_eq!(Month::from_str("MARCH").unwrap(),     Month::March);
assert_eq!(Month::from_str("Mar").unwrap(),       Month::March);
assert_eq!(Month::from_str("mar").unwrap(),       Month::March);
assert_eq!(Month::from_str("MAR").unwrap(),       Month::March);
assert_eq!(Month::from_str("4").unwrap(),         Month::April);
assert_eq!(Month::from_str("April").unwrap(),     Month::April);
assert_eq!(Month::from_str("april").unwrap(),     Month::April);
assert_eq!(Month::from_str("APRIL").unwrap(),     Month::April);
assert_eq!(Month::from_str("Apr").unwrap(),       Month::April);
assert_eq!(Month::from_str("apr").unwrap(),       Month::April);
assert_eq!(Month::from_str("APR").unwrap(),       Month::April);
assert_eq!(Month::from_str("5").unwrap(),         Month::May);
assert_eq!(Month::from_str("May").unwrap(),       Month::May);
assert_eq!(Month::from_str("may").unwrap(),       Month::May);
assert_eq!(Month::from_str("MAY").unwrap(),       Month::May);
assert_eq!(Month::from_str("6").unwrap(),         Month::June);
assert_eq!(Month::from_str("June").unwrap(),      Month::June);
assert_eq!(Month::from_str("june").unwrap(),      Month::June);
assert_eq!(Month::from_str("JUNE").unwrap(),      Month::June);
assert_eq!(Month::from_str("Jun").unwrap(),       Month::June);
assert_eq!(Month::from_str("jun").unwrap(),       Month::June);
assert_eq!(Month::from_str("JUN").unwrap(),       Month::June);
assert_eq!(Month::from_str("7").unwrap(),         Month::July);
assert_eq!(Month::from_str("July").unwrap(),      Month::July);
assert_eq!(Month::from_str("july").unwrap(),      Month::July);
assert_eq!(Month::from_str("JULY").unwrap(),      Month::July);
assert_eq!(Month::from_str("Jul").unwrap(),       Month::July);
assert_eq!(Month::from_str("jul").unwrap(),       Month::July);
assert_eq!(Month::from_str("JUL").unwrap(),       Month::July);
assert_eq!(Month::from_str("8").unwrap(),         Month::August);
assert_eq!(Month::from_str("August").unwrap(),    Month::August);
assert_eq!(Month::from_str("august").unwrap(),    Month::August);
assert_eq!(Month::from_str("AUGUST").unwrap(),    Month::August);
assert_eq!(Month::from_str("Aug").unwrap(),       Month::August);
assert_eq!(Month::from_str("aug").unwrap(),       Month::August);
assert_eq!(Month::from_str("AUG").unwrap(),       Month::August);
assert_eq!(Month::from_str("9").unwrap(),         Month::September);
assert_eq!(Month::from_str("September").unwrap(), Month::September);
assert_eq!(Month::from_str("september").unwrap(), Month::September);
assert_eq!(Month::from_str("SEPTEMBER").unwrap(), Month::September);
assert_eq!(Month::from_str("Sep").unwrap(),       Month::September);
assert_eq!(Month::from_str("sep").unwrap(),       Month::September);
assert_eq!(Month::from_str("SEP").unwrap(),       Month::September);
assert_eq!(Month::from_str("10").unwrap(),        Month::October);
assert_eq!(Month::from_str("October").unwrap(),   Month::October);
assert_eq!(Month::from_str("october").unwrap(),   Month::October);
assert_eq!(Month::from_str("OCTOBER").unwrap(),   Month::October);
assert_eq!(Month::from_str("Oct").unwrap(),       Month::October);
assert_eq!(Month::from_str("oct").unwrap(),       Month::October);
assert_eq!(Month::from_str("OCT").unwrap(),       Month::October);
assert_eq!(Month::from_str("11").unwrap(),        Month::November);
assert_eq!(Month::from_str("November").unwrap(),  Month::November);
assert_eq!(Month::from_str("november").unwrap(),  Month::November);
assert_eq!(Month::from_str("NOVEMBER").unwrap(),  Month::November);
assert_eq!(Month::from_str("Nov").unwrap(),       Month::November);
assert_eq!(Month::from_str("nov").unwrap(),       Month::November);
assert_eq!(Month::from_str("NOV").unwrap(),       Month::November);
assert_eq!(Month::from_str("12").unwrap(),        Month::December);
assert_eq!(Month::from_str("December").unwrap(),  Month::December);
assert_eq!(Month::from_str("december").unwrap(),  Month::December);
assert_eq!(Month::from_str("DECEMBER").unwrap(),  Month::December);
assert_eq!(Month::from_str("Dec").unwrap(),       Month::December);
assert_eq!(Month::from_str("dec").unwrap(),       Month::December);
assert_eq!(Month::from_str("DEC").unwrap(),       Month::December);
source

pub const fn from_bytes(bytes: &[u8]) -> Option<Self>

Same as Self::from_str but from [&[u8]]

Safety

bytes must be valid UTF-8.

source

pub const fn inner(self) -> u8

assert_eq!(Month::January.inner(),   1);
assert_eq!(Month::February.inner(),  2);
assert_eq!(Month::March.inner(),     3);
assert_eq!(Month::April.inner(),     4);
assert_eq!(Month::May.inner(),       5);
assert_eq!(Month::June.inner(),      6);
assert_eq!(Month::July.inner(),      7);
assert_eq!(Month::August.inner(),    8);
assert_eq!(Month::September.inner(), 9);
assert_eq!(Month::October.inner(),   10);
assert_eq!(Month::November.inner(),  11);
assert_eq!(Month::December.inner(),  12);

Trait Implementations§

source§

impl<'__de> BorrowDecode<'__de> for Month

source§

fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D ) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
source§

impl Clone for Month

source§

fn clone(&self) -> Month

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Month

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decode for Month

source§

fn decode<__D: Decoder>(decoder: &mut __D) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
source§

impl Default for Month

source§

fn default() -> Month

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Month

source§

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 Encode for Month

source§

fn encode<__E: Encoder>(&self, encoder: &mut __E) -> Result<(), EncodeError>

Encode a given type.
source§

impl Hash for Month

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Into<i128> for Month

source§

fn into(self) -> i128

Converts this type into the (usually inferred) input type.
source§

impl Into<i16> for Month

source§

fn into(self) -> i16

Converts this type into the (usually inferred) input type.
source§

impl Into<i32> for Month

source§

fn into(self) -> i32

Converts this type into the (usually inferred) input type.
source§

impl Into<i64> for Month

source§

fn into(self) -> i64

Converts this type into the (usually inferred) input type.
source§

impl Into<i8> for Month

source§

fn into(self) -> i8

Converts this type into the (usually inferred) input type.
source§

impl Into<isize> for Month

source§

fn into(self) -> isize

Converts this type into the (usually inferred) input type.
source§

impl Into<u128> for Month

source§

fn into(self) -> u128

Converts this type into the (usually inferred) input type.
source§

impl Into<u16> for Month

source§

fn into(self) -> u16

Converts this type into the (usually inferred) input type.
source§

impl Into<u32> for Month

source§

fn into(self) -> u32

Converts this type into the (usually inferred) input type.
source§

impl Into<u64> for Month

source§

fn into(self) -> u64

Converts this type into the (usually inferred) input type.
source§

impl Into<u8> for Month

source§

fn into(self) -> u8

Converts this type into the (usually inferred) input type.
source§

impl Into<usize> for Month

source§

fn into(self) -> usize

Converts this type into the (usually inferred) input type.
source§

impl Ord for Month

source§

fn cmp(&self, other: &Month) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<i128> for Month

source§

fn eq(&self, other: &i128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i16> for Month

source§

fn eq(&self, other: &i16) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i32> for Month

source§

fn eq(&self, other: &i32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i64> for Month

source§

fn eq(&self, other: &i64) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<i8> for Month

source§

fn eq(&self, other: &i8) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<isize> for Month

source§

fn eq(&self, other: &isize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u128> for Month

source§

fn eq(&self, other: &u128) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u16> for Month

source§

fn eq(&self, other: &u16) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u32> for Month

source§

fn eq(&self, other: &u32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u64> for Month

source§

fn eq(&self, other: &u64) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u8> for Month

source§

fn eq(&self, other: &u8) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<usize> for Month

source§

fn eq(&self, other: &usize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Month

source§

fn eq(&self, other: &Month) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Month

source§

fn partial_cmp(&self, other: &Month) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Month

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Month

source§

impl Eq for Month

source§

impl StructuralEq for Month

source§

impl StructuralPartialEq for Month

Auto Trait Implementations§

§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,