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

Increases capacity, guaranteeing that insertions up until the expected_count will not cause an allocation, and therefore cannot fail.

Parameters

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