Document.Element

HiBON Element representation

Constructors

this
this(immutable(ubyte[]) data)

Construct an Element based on buffer @param data - buffer

Members

Enums

ErrorCode
enum ErrorCode
Undocumented in source.

Functions

isIndex
bool isIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(Element other)

Compare two elements

Properties

as
T as [@property setter]

Tryes to convert the value to the type T. @return true if the function succeeds

by
auto by [@property getter]

@return the value as the HiBON type Type @throw if the element does not contain the type E and HiBONException is thrown

dataPos
uint dataPos [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
dataSize
uint dataSize [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
get
const(T) get [@property getter]

@return the value as the type T @throw if the element does not contain the type and HiBONException is thrown

index
uint index [@property getter]

@return the index of the key @throw if the key is not an index an HiBONException is thrown

isEod
bool isEod [@property getter]

@return true if the buffer block ends

isThat
bool isThat [@property getter]

* Check if the type match That template. * That template must have one parameter T as followes * @return true if the element is the type That

isType
bool isType [@property getter]

@return true if the elemnt is of T

key
Text key [@property setter]

@return the key

keyLen
uint keyLen [@property getter]

@return the key length

keyPos
uint keyPos [@property getter]

Evaluates key position @return key position

size
size_t size [@property getter]

@return the size of the element in bytes

type
Type type [@property getter]

@return the Type of the element

valid
ErrorCode valid [@property getter]

* Check if the element is valid * @return the error code the element. ErrorCode.NONE means that the element is valid

value
const(Value) value [@property getter]

@return the HiBON Value of the element @throw if the type is invalid and HiBONException is thrown

valuePos
uint valuePos [@property getter]

@return the position of the value inside the element buffer

Variables

data
immutable(ubyte[]) data;
Undocumented in source.

Meta