pub fn addOneBounded(self: *Self) error self: *Self1422
1423
1424
1425 pub fn addOneBounded(self: *Self) error{OutOfMemory}!*T {
if (self.capacity - self.items.len < 1) return error.OutOfMemory;
return addOneAssumeCapacity(self);
}
Increase length by 1, returning pointer to the new item. Never invalidates element pointers. The returned pointer may be invalidated by further operations to this list. If the list lacks unused capacity for the additional item, returns
error.OutOfMemory.