From e1a688efb16f96a6dca3678c67ff38b7cabfa8c6 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 7 Jul 2026 15:10:21 -0700 Subject: More augments and setup for use from other crates. --- crimtag/src/context.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crimtag/src/context.rs') diff --git a/crimtag/src/context.rs b/crimtag/src/context.rs index 15448ee..a922fd8 100644 --- a/crimtag/src/context.rs +++ b/crimtag/src/context.rs @@ -148,6 +148,12 @@ basic_mapped_value_from!(f32, Float32); basic_mapped_value_from!(f64, Float64); basic_mapped_value_from!(bool, Bool); +impl<'a> MappedStructure<'a> for HashMap { + fn get_value(&'a self, id: &str) -> Option> { + self.get(id).map(|x|MappedValue::String(x)) + } +} + impl<'a> From<&'a String> for MappedValue<'a> { fn from(val: &'a String ) -> MappedValue<'a> { MappedValue::String(val) -- cgit v1.2.3