feat: add has_attribute function to entity

This commit is contained in:
2025-09-30 12:02:35 +02:00
parent 8852a9569e
commit 172cffaad2

View File

@@ -52,6 +52,9 @@ impl O {
Some(attribute) => Some(attribute.value),
}
}
pub fn has_attribute(&self, id: &str) -> bool {
self.attributes.contains_key(id)
}
pub fn unwrap<T>(&self, id: &str) -> T
where
T: From<Value>,