ValueT

HiBON Generic value used by the HiBON class and the Document struct

@safe
union ValueT (
bool NATIVE = false
HiBON
Document
) {
@Type(Type.FLOAT64)
double float64;
@Type(Type.STRING)
string text;
@Type(Type.BOOLEAN)
bool boolean;
static if(!is(HiBON == void))
@Type(Type.DOCUMENT)
HiBON document;
static if(!(!is(HiBON == void)))
static if(!is(Document == void))
@Type(Type.DOCUMENT)
Document document;
@Type(Type.TIME)
sdt_t date;
@Type(Type.INT32)
int int32;
@Type(Type.INT64)
long int64;
@Type(Type.UINT32)
uint uint32;
@Type(Type.UINT64)
ulong uint64;
@Type(Type.BIGINT)
BigNumber bigint;
static if(!is(Document == void))
@Type(Type.NATIVE_DOCUMENT)
Document native_document;
@Type(Type.BINARY)
immutable(ubyte)[] binary;
static if(NATIVE)
@Type(Type.NATIVE_HIBON_ARRAY)
HiBON[] native_hibon_array;
static if(NATIVE)
@Type(Type.NATIVE_DOCUMENT_ARRAY)
Document[] native_document_array;
static if(NATIVE)
@Type(Type.NATIVE_STRING_ARRAY)
string[] native_string_array;
}

Constructors

this
this(T x)

Construct a Value of the type T

this
this(BigNumber big)

Constructs a Value of the type BigNumber

Members

Aliases

TypeT
alias TypeT(Type aType) = typeof(by!aType())

Convert a HiBON Type to a D-type

Enums

asType
eponymoustemplate asType(T)

convert the T to a HiBON-Type

hasType
eponymoustemplate hasType(T)

is true if the type T is support by the HiBON

Functions

by
auto by()
opAssign
void opAssign(T x)

Assign the value to x

opAssign
void opAssign(T x)

Assign of none standard HiBON types. This function will cast to type has the best match to the parameter x

size
uint size()

Variables

float32
float float32;

HiBON Generic value used by the HiBON class and the Document struct