ValueT

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

@nogc
union ValueT (
bool NATIVE = false
HiBON
Document
) {
@nogc
@Type(Type.FLOAT64)
double float64;
@nogc
@Type(Type.STRING)
string text;
@nogc
@Type(Type.BOOLEAN)
bool boolean;
@nogc
static if(!is(HiBON == void))
@Type(Type.DOCUMENT)
HiBON document;
@nogc
static if(!(!is(HiBON == void)))
static if(!is(Document == void))
@Type(Type.DOCUMENT)
Document document;
@nogc
@Type(Type.TIME)
sdt_t date;
@nogc
@Type(Type.INT32)
int int32;
@nogc
@Type(Type.INT64)
long int64;
@nogc
@Type(Type.UINT32)
uint uint32;
@nogc
@Type(Type.UINT64)
ulong uint64;
@nogc
@Type(Type.BIGINT)
BigNumber bigint;
@nogc
@Type(Type.HASHDOC)
DataBlock hashdoc;
@nogc
static if(!is(Document == void))
@Type(Type.NATIVE_DOCUMENT)
Document native_document;
@nogc
@Type(Type.BINARY)
immutable(ubyte)[] binary;
@nogc
static if(NATIVE)
@Type(Type.NATIVE_HIBON_ARRAY)
HiBON[] native_hibon_array;
@nogc
static if(NATIVE)
@Type(Type.NATIVE_DOCUMENT_ARRAY)
Document[] native_document_array;
@nogc
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()

* @return the value as HiBON type E

opAssign
void opAssign(T x)

Assign the value to x @param x = value to be assigned

size
uint size()

@return the size on bytes of the value as a HiBON type E

Variables

float32
float float32;

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