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 needs an initial capacity.

this
this(Value[] valueArray)

Construct a new list from an array of values.

this
this(uint capacity)

Constructs a list that can hold at most capacity elements.

this
this(List other)

Create a copy of other list.

this
this(Value value)

Create a list from a Value.

this
this(mg_list* ptr)

Create a List using the given mg_list.

this
this(mg_list* ptr)

Create a List from a copy of the given mg_list.

Destructor

~this
~this()
Undocumented in source.

Postblit

this(this)
this(this)
Undocumented in source.

Members

Functions

front
auto front()

Returns the next element in the list range.

opEquals
bool opEquals(List other)

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

opEquals
bool opEquals(Value[] valueArray)

Compares this list with an array of values. Return: true if same, false otherwise.

opIndex
auto opIndex(size_t idx)

Return value at position idx of this list.

opOpAssign
List opOpAssign(Value value)

Append value to this list.

popFront
void popFront()

Move to the next element in the list range.

ptr
const(mg_list*) ptr()

Return pointer to internal mg_list.

toString
const(string) toString()

Return a printable string representation of this list.

Properties

empty
bool empty [@property getter]

Checks if the list as range is empty.

length
uint length [@property getter]

Returns the number of values in this list.

Meta