VariantArrays

Stores set of variants.

Enables lightweight storage of polymorphic objects.

Each element is indexed by a corresponding VariantRef.

Members

Aliases

Ref
alias Ref = VariantRef!(Size, Types)
Undocumented in source.
Size
alias Size = size_t
Undocumented in source.
put
alias put = insertBack
Undocumented in source.

Functions

allOf
inout(SomeKind)[] allOf()

Constant access to all elements of type SomeKind.

at
inout(SomeKind) at(size_t index)

Get reference to element of type SomeKind at index.

at
inout(SomeKind) at(Ref ref_)

Get reference to element of type SomeKind at ref_.

empty
bool empty()

Check if empty.

insertBack
Ref insertBack(SomeKind value)

Insert value at back.

insertBackMove
Ref insertBackMove(SomeKind value)
opOpAssign
void opOpAssign(SomeKind value)

Move (emplace) value into back.

peek
inout(SomeKind)* peek(Ref ref_)

Peek at element of type SomeKind at ref_.

reserve
size_t reserve(size_t newCapacity)

Reserve space for newCapacity elements of type SomeKind.

Properties

length
size_t length [@property getter]

Static functions

makeRef
Ref makeRef(Ref.Size index)

Make reference to type SomeKind at offset index.

Meta