Value

A Bolt value, encapsulating all other values.

Constructors

this
this(typeof(null) )

Make a Null value.

this
this(Value rhs)

Copy constructor.

this
this(T val)

Make a new value of type T and initialise it with val.

this
this(mg_value* p)

Create a Value using the given mg_value.

this
this(mg_value* p)

Create a Value from a copy of the given mg_value.

Destructor

~this
~this()

Destroys the internal mg_value.

Postblit

this(this)
this(this)

Create a copy of the internal mg_value.

Members

Functions

opAssign
Value opAssign(T val)

Assignment operator for type T.

opAssign
Value opAssign(Value value)

Assignment operator for another Value.

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
const(mg_value*) ptr()

Returns internal mg_value pointer.

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