diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-04-13 21:41:24 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-04-13 21:41:24 +0800 |
| commit | e730cea0224323c97539fcc657a83ee6320bcc1c (patch) | |
| tree | f05c9795fd19b345063835fa798a01e9b094b195 /mingling_core/src | |
| parent | 17cf59fe8220ac5befbbe8333fa0515ab532103d (diff) | |
Add Pickable implementation for enums with EnumTag trait
Diffstat (limited to 'mingling_core/src')
| -rw-r--r-- | mingling_core/src/asset/enum_tag.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mingling_core/src/asset/enum_tag.rs b/mingling_core/src/asset/enum_tag.rs index 563d826..28428a6 100644 --- a/mingling_core/src/asset/enum_tag.rs +++ b/mingling_core/src/asset/enum_tag.rs @@ -7,5 +7,7 @@ pub trait EnumTag { fn enums() -> &'static [(&'static str, &'static str)]; /// Build the enum from a name - fn build_enum(name: String) -> Self; + fn build_enum(name: String) -> Option<Self> + where + Self: Sized; } |
