List

An ordered sequence of values.

List may contain a mixture of different types as its elements. A list owns all values stored in it.

Maximum possible list length allowed by Bolt is uint.max.

Constructors

this
this(List other)

Create a shallow copy of other list.

this
this(Value value)

Create a shallow list copy from a Value.

this
this(mg_list* ptr)

Create a List using the given mg_list pointer.

Members

Functions

opEquals
auto opEquals(List other)

Compares this list with other. Return: true if same, false otherwise.

opIndex
auto opIndex(uint idx)

Return value at position idx of this list.

popFront
void popFront()

Move to the next element in the list range.

ptr
auto ptr()

Return pointer to internal mg_list.

toHash
size_t toHash()

Return the hash code for this list.

toString
string toString()

Return a printable string representation of this list.

Properties

empty
bool empty [@property getter]

Checks if the list as range is empty.

front
auto front [@property getter]

Returns the next element in the list range.

length
uint length [@property getter]

Returns the number of values in this list.

Meta