serdeProxy

Serialization proxy.

Members

Aliases

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

Enums

serdeScopeStringProxy
deprecated enum serdeScopeStringProxy

Can be applied only to fields that can be constructed from strings. Does not allocate new data when deserializeing. Raw data is used for strings instead of new memory allocation. Use this attributes only for strings that would not be used after the input data deallocation.

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;
}

import std.traits: hasUDA;

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

Meta