Enum nichi::DaysInYear
source · #[repr(u8)]pub enum DaysInYear {
ThreeSixFive = 0,
ThreeSixSix = 1,
}Expand description
Days in a year accounting for leap years
Variants§
Implementations§
source§impl DaysInYear
impl DaysInYear
sourcepub const fn inner(self) -> u16
pub const fn inner(self) -> u16
assert_eq!(DaysInYear::ThreeSixFive.inner(), 365);
assert_eq!(DaysInYear::ThreeSixSix.inner(), 366);sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
assert_eq!(DaysInYear::ThreeSixFive.as_str(), "ThreeSixFive");
assert_eq!(DaysInYear::ThreeSixSix.as_str(), "ThreeSixSix");sourcepub const fn as_str_num(self) -> &'static str
pub const fn as_str_num(self) -> &'static str
assert_eq!(DaysInYear::ThreeSixFive.as_str_num(), "365");
assert_eq!(DaysInYear::ThreeSixSix.as_str_num(), "366");sourcepub const fn as_str_lower(self) -> &'static str
pub const fn as_str_lower(self) -> &'static str
assert_eq!(DaysInYear::ThreeSixFive.as_str_lower(), "threesixfive");
assert_eq!(DaysInYear::ThreeSixSix.as_str_lower(), "threesixsix");sourcepub const fn as_str_upper(self) -> &'static str
pub const fn as_str_upper(self) -> &'static str
assert_eq!(DaysInYear::ThreeSixFive.as_str_upper(), "THREESIXFIVE");
assert_eq!(DaysInYear::ThreeSixSix.as_str_upper(), "THREESIXSIX");Trait Implementations§
source§impl<'__de> BorrowDecode<'__de> for DaysInYear
impl<'__de> BorrowDecode<'__de> for DaysInYear
source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D
) -> Result<Self, DecodeError>
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 DaysInYear
impl Clone for DaysInYear
source§fn clone(&self) -> DaysInYear
fn clone(&self) -> DaysInYear
Returns a copy 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 DaysInYear
impl Debug for DaysInYear
source§impl Decode for DaysInYear
impl Decode for DaysInYear
source§impl Default for DaysInYear
impl Default for DaysInYear
source§fn default() -> DaysInYear
fn default() -> DaysInYear
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for DaysInYear
impl<'de> Deserialize<'de> for DaysInYear
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 Display for DaysInYear
impl Display for DaysInYear
source§impl Encode for DaysInYear
impl Encode for DaysInYear
source§impl Hash for DaysInYear
impl Hash for DaysInYear
source§impl Into<i128> for DaysInYear
impl Into<i128> for DaysInYear
source§impl Into<i16> for DaysInYear
impl Into<i16> for DaysInYear
source§impl Into<i32> for DaysInYear
impl Into<i32> for DaysInYear
source§impl Into<i64> for DaysInYear
impl Into<i64> for DaysInYear
source§impl Into<i8> for DaysInYear
impl Into<i8> for DaysInYear
source§impl Into<isize> for DaysInYear
impl Into<isize> for DaysInYear
source§impl Into<u128> for DaysInYear
impl Into<u128> for DaysInYear
source§impl Into<u16> for DaysInYear
impl Into<u16> for DaysInYear
source§impl Into<u32> for DaysInYear
impl Into<u32> for DaysInYear
source§impl Into<u64> for DaysInYear
impl Into<u64> for DaysInYear
source§impl Into<u8> for DaysInYear
impl Into<u8> for DaysInYear
source§impl Into<usize> for DaysInYear
impl Into<usize> for DaysInYear
source§impl Ord for DaysInYear
impl Ord for DaysInYear
source§fn cmp(&self, other: &DaysInYear) -> Ordering
fn cmp(&self, other: &DaysInYear) -> Ordering
1.21.0 · 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 PartialEq<i128> for DaysInYear
impl PartialEq<i128> for DaysInYear
source§impl PartialEq<i16> for DaysInYear
impl PartialEq<i16> for DaysInYear
source§impl PartialEq<i32> for DaysInYear
impl PartialEq<i32> for DaysInYear
source§impl PartialEq<i64> for DaysInYear
impl PartialEq<i64> for DaysInYear
source§impl PartialEq<i8> for DaysInYear
impl PartialEq<i8> for DaysInYear
source§impl PartialEq<isize> for DaysInYear
impl PartialEq<isize> for DaysInYear
source§impl PartialEq<u128> for DaysInYear
impl PartialEq<u128> for DaysInYear
source§impl PartialEq<u16> for DaysInYear
impl PartialEq<u16> for DaysInYear
source§impl PartialEq<u32> for DaysInYear
impl PartialEq<u32> for DaysInYear
source§impl PartialEq<u64> for DaysInYear
impl PartialEq<u64> for DaysInYear
source§impl PartialEq<u8> for DaysInYear
impl PartialEq<u8> for DaysInYear
source§impl PartialEq<usize> for DaysInYear
impl PartialEq<usize> for DaysInYear
source§impl PartialEq for DaysInYear
impl PartialEq for DaysInYear
source§fn eq(&self, other: &DaysInYear) -> bool
fn eq(&self, other: &DaysInYear) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for DaysInYear
impl PartialOrd for DaysInYear
source§fn partial_cmp(&self, other: &DaysInYear) -> Option<Ordering>
fn partial_cmp(&self, other: &DaysInYear) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moresource§impl Serialize for DaysInYear
impl Serialize for DaysInYear
impl Copy for DaysInYear
impl Eq for DaysInYear
impl StructuralEq for DaysInYear
impl StructuralPartialEq for DaysInYear
Auto Trait Implementations§
impl RefUnwindSafe for DaysInYear
impl Send for DaysInYear
impl Sync for DaysInYear
impl Unpin for DaysInYear
impl UnwindSafe for DaysInYear
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