use evtclib::{Boss, Log}; pub trait Categorizable { fn category(&self) -> &'static str; } impl Categorizable for Log { fn category(&self) -> &'static str { if let Some(encounter) = self.encounter() { match encounter { Boss::ValeGuardian | Boss::Gorseval | Boss::Sabetha => "Wing 1 (Spirit Vale)", Boss::Slothasor | Boss::Matthias => "Wing 2 (Salvation Pass)", Boss::KeepConstruct | Boss::Xera => "Wing 3 (Stronghold of the Faithful)", Boss::Cairn | Boss::MursaatOverseer | Boss::Samarog | Boss::Deimos => { "Wing 4 (Bastion of the Penitent)" } Boss::SoullessHorror | Boss::Dhuum => "Wing 5 (Hall of Chains)", Boss::ConjuredAmalgamate | Boss::LargosTwins | Boss::Qadim => { "Wing 6 (Mythwright Gambit)" } Boss::CardinalAdina | Boss::CardinalSabir | Boss::QadimThePeerless => { "Wing 7 (Key of Ahdashim)" } Boss::Skorvald | Boss::Artsariiv | Boss::Arkk => "100 CM (Shattered Observatory)", Boss::MAMA | Boss::Siax | Boss::Ensolyss => "99 CM (Nightmare)", Boss::IcebroodConstruct | Boss::VoiceOfTheFallen | Boss::FraenirOfJormag | Boss::Boneskinner | Boss::WhisperOfJormag => "Strike Mission", } } else { "Unknown" } } }