isSerialisable

Eponymous template bool of whether a variable can be treated as a mutable variable, like a fundamental integral, and thus be serialised.

Currently it does not support static arrays.

Members

Aliases

T
alias T = typeof(sym)
Undocumented in source.

Imports

isSomeFunction (from std.traits)
public import std.traits : isSomeFunction;
Undocumented in source.
isType (from std.traits)
public import std.traits : isType;
Undocumented in source.

Manifest constants

isSerialisable
enum isSerialisable;
Undocumented in source.
isSerialisable
enum isSerialisable;
Undocumented in source.

Parameters

sym

Alias of symbol to introspect.

Examples

int i;
char[] c;
char[8] c2;
struct S {}
class C {}
enum E { foo }
E e;

static assert(isSerialisable!i);
static assert(isSerialisable!c);
static assert(!isSerialisable!c2); // should static arrays pass?
static assert(!isSerialisable!S);
static assert(!isSerialisable!C);
static assert(!isSerialisable!E);
static assert(isSerialisable!e);

Meta