File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ module mir.serde;
13
13
14
14
import mir.functional: naryFun;
15
15
import mir.reflection;
16
+ import std.meta : AliasSeq;
16
17
import std.traits : TemplateArgsOf, EnumMembers, hasUDA, isAggregateType;
17
18
18
19
version (D_Exceptions)
@@ -653,6 +654,13 @@ version(mir_test) unittest
653
654
+/
654
655
alias serdeGetProxy (alias symbol) = TemplateArgsOf! (getUDA! (symbol, serdeProxy))[0 ];
655
656
657
+ // / Can be applied to @serdeProxy types to make (de)serialization use
658
+ // / underlying type through casting. Useful for enums.
659
+ enum serdeProxyCast;
660
+
661
+ // / Equivalent to @serdeProxy!T @serdeProxyCast
662
+ alias serdeEnumProxy (T) = AliasSeq! (serdeProxy! T, serdeProxyCast);
663
+
656
664
/+ +
657
665
Attributes to conditional ignore field during serialization.
658
666
You can’t perform that action at this time.
0 commit comments