DoxigAlpha

appendSliceBounded

Append the slice of items to the list.

If the list lacks unused capacity for the additional items, returns error.OutOfMemory.

Function parameters

Parameters

#
self:*Self
items:[]const T

Deprecated.

Functions

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

Source

Implementation

#
pub fn appendSliceBounded(self: *Self, items: []const T) error{OutOfMemory}!void {
    if (self.capacity - self.items.len < items.len) return error.OutOfMemory;
    return appendSliceAssumeCapacity(self, items);
}