LimitedVariant

A limited variant to hold just a few types. It is made for the use of packing a small amount of extra data into error messages and some transit across virtual function boundaries.

Constructors

this
this(string s)
this(const(char)* stringz)
this(const(ubyte)[] b)
this(long l, int base)
this(int i, int base)
this(bool i)
this(double d)
this(Object o)
this(MonoTime a)
this(SimplifiedUtcTimestamp a)
this(Duration a)
this(PackedDateTime a)

Note for integral types that are not int and long (for example, short or ubyte), you might want to explicitly convert them to int.

Members

Enums

Contains
enum Contains

Functions

contains
Contains contains()
containsBytes
bool containsBytes()
containsDateTime
bool containsDateTime()
containsDouble
bool containsDouble()
containsDuration
bool containsDuration()
containsInt
bool containsInt()
containsMonoTime
bool containsMonoTime()
containsNull
bool containsNull()
containsString
bool containsString()
containsUtcTimestamp
bool containsUtcTimestamp()

Each datum stored in the LimitedVariant has a tag associated with it.

getBytes
const(ubyte)[] getBytes()
getDateTime
PackedDateTime getDateTime()
getDouble
double getDouble()
getDuration
Duration getDuration()
getInt
long getInt()
getMonoTime
MonoTime getMonoTime()
getObject
Object getObject()

getString gets a reference to the string stored internally, see toString to get a string representation or whatever is inside.

getString
const(char)[] getString()
getUtcTimestamp
SimplifiedUtcTimestamp getUtcTimestamp()

getString gets a reference to the string stored internally, see toString to get a string representation or whatever is inside.

toString
string toString()

Meta