DoxigAlpha

addOne

Extend the list by 1 element, returning the newly reserved index with uninitialized data. Allocates more memory as necesasry.

Function parameters

Parameters

#
self:*Self

A MultiArrayList stores a list of a struct or tagged union type.

Functions

#
MultiArrayList
A MultiArrayList stores a list of a struct or tagged union type.

Source

Implementation

#
pub fn addOne(self: *Self, gpa: Allocator) Allocator.Error!usize {
    try self.ensureUnusedCapacity(gpa, 1);
    return self.addOneAssumeCapacity();
}