List

Undocumented in source.

Constructors

this
this(Args args)

Construct List with initial elements.

this
this(T[] backingSlice, Args args)

Construct List with backing slice and optional initial elements.

this
this(T* backingArrayPointer, size_t capacity, Args args)

Construct List with backing pointer and capacity and optional initial elements.

this
this(void[] backingSlice, Args args)

Construct List with backing buffer slice and optional initial elements.

this
this(void* backingArrayPointer, size_t bufferSize, Args args)

Construct List with backing buffer pointer and size and optional initial elements.

Alias This

usedSlice

Alias this allows operations to target used slice by default.

Members

Aliases

ElementType
alias ElementType = T

Undocumented in source.

pop
alias pop = popBack

Undocumented in source.

push
alias push = pushBack

Undocumented in source.

Functions

clear
void clear()

Clear all elements of List. If element type has elaborate destructor, popped slots are reinitialized to T.init.

opIndex
auto opIndex()

Get a slice for the used elements.

opIndex
auto ref opIndex(size_t index)

Index the slice of used elements.

opOpAssign
auto opOpAssign(Args args)

Push back elements on list ~= args

popBack
void popBack()

Pop the last element from List. If element type has elaborate destructor, popped slot is reinitialized to T.init.

popBack
void popBack(size_t count)

Pop count elements from the back of the List. If element type has elaborate destructor, popped slots are reinitialized to T.init.

pushBack
long pushBack(U value)

Push a value in the end of List.

pushBack
long pushBack(R range)
long pushBack(Args args)

Push a range of values to the end of List.

usedSlice
auto usedSlice()

Get a slice for the used elements.

Manifest constants

isSized
enum isSized;

Whether List has fixed size, which means it is backed by a static array

Properties

availableCapacity
size_t availableCapacity [@property getter]

Available capacity for inserting elements.

capacity
size_t capacity [@property getter]

List element capacity, which is the backing array's length.

empty
bool empty [@property getter]

Returns whether there are no elements in List.

full
bool full [@property getter]

Returns whether List is full, that is, has no more available capacity.

Variables

array
T[N] array;

Static array with capacity N that holds the List elements.

array
T[] array;

Slice with dynamic capacity that holds the List elements.

Meta