DoxigAlpha

append

Extends the list by 1 element. Allocates more memory as necessary. Invalidates element pointers if additional memory is needed.

Function parameters

Parameters

#
self:*Self
item:T

Deprecated.

Functions

#
Managed
Deprecated.
AlignedManaged
Deprecated.
Aligned
A contiguous, growable list of arbitrarily aligned items in memory.

Source

Implementation

#
pub fn append(self: *Self, item: T) Allocator.Error!void {
    const new_item_ptr = try self.addOne();
    new_item_ptr.* = item;
}