pub fn addOneBounded(self: *Self) error self: *Self324
325
326
327 pub fn addOneBounded(self: *Self) error{OutOfMemory}!usize {
if (self.capacity - self.len < 1) return error.OutOfMemory;
return addOneAssumeCapacity(self);
}
Extend the list by 1 element, returning the newly reserved index with uninitialized data.
If capacity is not sufficient to hold an additional item, returns
error.OutOfMemory.