use alloc::string::String;
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Activity {
Marriage,
Building,
Travel,
Business,
Agriculture,
ReligiousCeremony,
Naming,
MovingHouse,
Education,
Medical,
Custom(String),
}
impl Activity {
#[must_use]
pub fn description(&self) -> &str {
match self {
Self::Marriage => "Marriage ceremonies and weddings",
Self::Building => "Building construction and foundation laying",
Self::Travel => "Travel and journeys",
Self::Business => "Business ventures and commerce",
Self::Agriculture => "Agricultural activities and planting",
Self::ReligiousCeremony => "Religious ceremonies and rituals",
Self::Naming => "Naming ceremonies for children",
Self::MovingHouse => "Moving to a new house or residence",
Self::Education => "Starting education or learning",
Self::Medical => "Medical treatments and procedures",
Self::Custom(desc) => desc,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum AuspiciousnessLevel {
VeryAuspicious,
Auspicious,
Neutral,
Inauspicious,
VeryInauspicious,
}
impl AuspiciousnessLevel {
#[must_use]
pub const fn description(&self) -> &'static str {
match self {
Self::VeryAuspicious => "Very auspicious - extremely favorable",
Self::Auspicious => "Auspicious - favorable",
Self::Neutral => "Neutral - neither favorable nor unfavorable",
Self::Inauspicious => "Inauspicious - unfavorable",
Self::VeryInauspicious => "Very inauspicious - very unfavorable",
}
}
#[must_use]
pub const fn is_auspicious(self) -> bool {
matches!(self, Self::Auspicious | Self::VeryAuspicious)
}
#[must_use]
pub const fn is_very_auspicious(self) -> bool {
matches!(self, Self::VeryAuspicious)
}
#[must_use]
pub const fn is_inauspicious(self) -> bool {
matches!(self, Self::Inauspicious | Self::VeryInauspicious)
}
#[must_use]
pub const fn is_very_inauspicious(self) -> bool {
matches!(self, Self::VeryInauspicious)
}
#[must_use]
pub const fn is_neutral(self) -> bool {
matches!(self, Self::Neutral)
}
}
impl core::fmt::Display for Activity {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.description())
}
}
impl core::fmt::Display for AuspiciousnessLevel {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{}", self.description())
}
}