SerializableMembers

enum string[] SerializableMembers(T);

Return Value

list of the serializable (public getters) members.

Examples

struct D
{
    int y;

    int gf() @property {return 0;}
}

struct I
{
    int f;

    D base;
    alias base this;

    int gi() @property {return 0;}
}

struct S
{
    int d;

    package int p;

    int gm() @property {return 0;}

    private int q;

    I i;
    alias i this;

    int gc() const @property {return 0;}
    void gs(int) @property {}
}

static assert(SerializableMembers!S == ["y", "gf", "f", "gi", "d", "gm", "gc"]);
static assert(SerializableMembers!(const S) == ["y", "f", "d", "gc"]);

Meta