/* This file is part of jellything (https://codeberg.org/metamuffin/jellything) which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2026 metamuffin */ use crate::Tag; use log::error; use std::{any::TypeId, collections::BTreeMap}; #[derive(Default)] pub struct Registry { tags: BTreeMap, } impl Registry { pub fn add(&mut self, tag: Tag, info: TagInfo) { if let Some(other) = self.tags.get(&tag) { error!("Tag conflict: {:?} vs {:?}", info.name, other.name) } self.tags.insert(tag, info); } } pub struct TagInfo { pub name: &'static str, pub r#type: Option, }