Value

A Bolt value, encapsulating all other values.

Constructors

this
this(Value rhs)

Copy constructor.

this
this(mg_value* p)

Create a Value using the given mg_value.

Members

Functions

opCast
auto opCast()

Cast this value to type T. Note: The code asserts that the current value holds a representation of type T.

opEquals
bool opEquals(T val)

Comparison operator for type T. Note: The code asserts that the current value holds a representation of type T.

opEquals
bool opEquals(Value other)

Comparison operator for another Value.

ptr
auto ptr()

Returns internal mg_value pointer.

toHash
size_t toHash()

Return the hash code for this value.

toString
string toString()

Return this value as a string. If the value held is not of type Type.String, then it will be first converted into the appropriate string representation.

Properties

type
Type type [@property getter]

Return the type of value being held.

Meta