From 22820dbea9b2db898e5f54e26ab9574784e340d8 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 13 Oct 2026 13:27:16 -0400 Subject: Tweaks to datalog --- crates/elfmind/src/noun/character.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crates/elfmind/src/noun/character.rs') diff --git a/crates/elfmind/src/noun/character.rs b/crates/elfmind/src/noun/character.rs index e6029c0..800b0de 100644 --- a/crates/elfmind/src/noun/character.rs +++ b/crates/elfmind/src/noun/character.rs @@ -39,3 +39,15 @@ pub enum CharacterMasked { Rat, Pig, } +impl From for Noun { fn from(x: CharacterMasked) -> Self {Noun::CharacterMasked(x)} } +impl TryFrom for CharacterMasked { + type Error = (); + fn try_from(v: Noun) -> Result { + if let Noun::CharacterMasked(x) = v { Ok(x) } else { Err(()) } + } +} +impl DisplayNoun for CharacterMasked { + fn display_noun(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self) + } +} -- cgit v1.3.1