pub fn ensureTotalCapacity(self: *Self, expected_count: Size) Allocator.Error!void
Increases capacity, guaranteeing that insertions up until the expected_count will not cause an allocation, and therefore cannot fail.
expected_count
self: *Self
expected_count: Size
303 304 305
pub fn ensureTotalCapacity(self: *Self, expected_count: Size) Allocator.Error!void { return self.unmanaged.ensureTotalCapacityContext(self.allocator, expected_count, self.ctx); }
Increases capacity, guaranteeing that insertions up until the
expected_countwill not cause an allocation, and therefore cannot fail.