Sets the length of the array.
Appends an array of elements.
Appends an element.
element type of array which the API mimics
// Backing array. void[] backing; // Wrap the backing array for use as an S[]. struct S { ubyte b; hash_t h; } auto s_array = VoidBufferAsArrayOf!(S)(&backing); // Append some elements. s_array ~= S(); s_array ~= [S(), S(), S()]; // Resize the array. s_array.length = 2; // Iterate over the elements. foreach ( e; s_array.array() ) { }
Struct template which wraps a void[] with an API allowing it to be safely used as an array of another type.