From c4ee47647a5bf1a06ae88ebb9410117c927868ee Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Mon, 12 Oct 2026 01:31:00 -0400 Subject: Major refactor, generate relation traits with macros --- crates/elfmind/src/noun/character.rs | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 crates/elfmind/src/noun/character.rs (limited to 'crates/elfmind/src/noun/character.rs') diff --git a/crates/elfmind/src/noun/character.rs b/crates/elfmind/src/noun/character.rs new file mode 100644 index 0000000..e6029c0 --- /dev/null +++ b/crates/elfmind/src/noun/character.rs @@ -0,0 +1,41 @@ +use crate::knowledge::*; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub enum CharacterUnmasked { + Assagioli, + Bombieri, + Cagliostro, + Divini, + Eustachi, + Fracastoro, + Grimaldi, + Human, +} +impl From for Noun { fn from(x: CharacterUnmasked) -> Self {Noun::CharacterUnmasked(x)} } +impl TryFrom for CharacterUnmasked { + type Error = (); + fn try_from(v: Noun) -> Result { + if let Noun::CharacterUnmasked(x) = v { Ok(x) } else { Err(()) } + } +} +impl DisplayNoun for CharacterUnmasked { + fn display_noun(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self) + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub enum CharacterMasked { + Dragon, + Tiger, + Rooster, + Rabbit, + Dog, + Horse, + Monkey, + Ox, + Goat, + Snake, + Rat, + Pig, +} -- cgit v1.3.1