Skip to content

Commit c0838f2

Browse files
committed
Add SerdeAnnotated
1 parent 10a0558 commit c0838f2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/mir/serde.d

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,23 @@ version (D_Exceptions)
6565
}
6666
}
6767

68+
/++
69+
Constructs annotated type.
70+
+/
71+
template SerdeAnnotated(T, string annotation)
72+
{
73+
///
74+
@serdeAlgebraicAnnotation(annotation)
75+
@serdeProxy!T
76+
struct SerdeAnnotated
77+
{
78+
///
79+
T value;
80+
///
81+
alias value this;
82+
}
83+
}
84+
6885
/++
6986
Helper enumeration for for serializer .
7087
Use negative `int` values for user defined targets.

0 commit comments

Comments
 (0)