pub enum BadiMonth {
Month(u8),
AyyamIHa,
}Expand description
Represents one of the 19 Bahá’í months or Ayyám-i-Há
Variants§
Month(u8)
One of the 19 Badi/Bahá’í months (parameter is 1-based month number)
AyyamIHa
The intercalary days of Ayyám-i-Há
Implementations§
Source§impl BadiMonth
impl BadiMonth
Sourcepub fn validate(&self) -> Result<Self, BadiDateError>
pub fn validate(&self) -> Result<Self, BadiDateError>
Return self if month is valid, otherwise BadiDateError::MonthInvalid
Sourcepub fn number_of_days(&self, year: u8) -> u16
pub fn number_of_days(&self, year: u8) -> u16
Max number of days in the month (year required to compute Ayyám-i-Há days)
Sourcepub fn transliteration(&self) -> String
pub fn transliteration(&self) -> String
English transliteration of Arabic name of the month
Sourcepub fn additional_meanings(&self) -> String
pub fn additional_meanings(&self) -> String
Additional meanings in authorized English translations of Baháʼí scripture https://en.wikipedia.org/wiki/Bah%C3%A1%CA%BC%C3%AD_calendar
Sourcepub fn name(&self, locale: &str) -> String
pub fn name(&self, locale: &str) -> String
Get name of the month in a locale (see /locales/app.yaml): en: English ar: Arabic tl: English transliteration extra: Additional meanings (English)
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a (debug) description of the month
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BadiMonth
impl<'de> Deserialize<'de> for BadiMonth
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 BadiMonth
impl Ord for BadiMonth
Source§impl PartialOrd for BadiMonth
impl PartialOrd for BadiMonth
impl Copy for BadiMonth
impl Eq for BadiMonth
impl StructuralPartialEq for BadiMonth
Auto Trait Implementations§
impl Freeze for BadiMonth
impl RefUnwindSafe for BadiMonth
impl Send for BadiMonth
impl Sync for BadiMonth
impl Unpin for BadiMonth
impl UnwindSafe for BadiMonth
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more