diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-04-13 21:19:03 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-04-13 21:19:03 +0800 |
| commit | 17cf59fe8220ac5befbbe8333fa0515ab532103d (patch) | |
| tree | c2470e6ecc44a74fc40eef8b5bc36901b9e939c6 /mingling_core/src/asset | |
| parent | b4cef6e601777b8c4b18df118689f8ac310fa835 (diff) | |
Remove comp module and add EnumTag derive macro
Diffstat (limited to 'mingling_core/src/asset')
| -rw-r--r-- | mingling_core/src/asset/enum_tag.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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; +} |
