From 17cf59fe8220ac5befbbe8333fa0515ab532103d Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 13 Apr 2026 21:19:03 +0800 Subject: Remove comp module and add EnumTag derive macro --- mingling_core/src/asset/enum_tag.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 mingling_core/src/asset/enum_tag.rs (limited to 'mingling_core/src/asset') diff --git a/mingling_core/src/asset/enum_tag.rs b/mingling_core/src/asset/enum_tag.rs new file mode 100644 index 0000000..563d826 --- /dev/null +++ b/mingling_core/src/asset/enum_tag.rs @@ -0,0 +1,11 @@ +/// Marker trait for EnumTag +pub trait EnumTag { + /// Get the name and description of this enum + fn enum_info(&self) -> (&'static str, &'static str); + + /// Get all possible enum variant names and descriptions + fn enums() -> &'static [(&'static str, &'static str)]; + + /// Build the enum from a name + fn build_enum(name: String) -> Self; +} -- cgit