fn ensureTotalCapacity(self: *Self, allocator: Allocator, new_capacity: usize) Allocator.Error!void

Modify the array so that it can hold at least new_capacity items. Invalidates pointers if additional memory is needed.

Parameters

self: *Self,
allocator: Allocator,
new_capacity: usize,