DoxigAlpha

addOne

Function parameters

Parameters

#
self:*Self

This is a stack data structure where pointers to indexes have the same lifetime as the data structure

Functions

#
SegmentedList
This is a stack data structure where pointers to indexes have the same lifetime as the data structure

Source

Implementation

#
pub fn addOne(self: *Self, allocator: Allocator) Allocator.Error!*T {
    const new_length = self.len + 1;
    try self.growCapacity(allocator, new_length);
    const result = uncheckedAt(self, self.len);
    self.len = new_length;
    return result;
}