The OpenD Programming Language

serdeProxy

Serialization proxy.

Members

Aliases

serdeEnumProxy
alias serdeEnumProxy(T) = AliasSeq!(serdeProxy!T, serdeProxyCast)

Equivalent to @serdeProxy!T @serdeProxyCast

serdeGetProxy
alias serdeGetProxy(alias symbol) = TemplateArgsOf!(getUDA!(symbol, serdeProxy))[0]
alias serdeGetProxy(T, string member) = TemplateArgsOf!(getUDA!(T, member, serdeProxy))[0]

Enums

serdeProxyCast
enum serdeProxyCast

Can be applied to @serdeProxy types to make (de)serialization use underlying type through casting. Useful for enums.

Structs

serdeIgnoreOutIf
struct serdeIgnoreOutIf(alias pred)

Attributes to conditional ignore field during serialization.

Examples

import mir.small_string;

struct S
{
    @serdeProxy!(SmallString!32)
    double d;
}


static assert(hasUDA!(S.d, serdeProxy));
static assert(hasUDA!(S.d, serdeProxy!(SmallString!32)));
static assert(is(serdeGetProxy!(S.d) == SmallString!32));

Meta