appendUnalignedSliceBounded
Append an unaligned slice of items to the list.
Intended to be used only when appendSliceAssumeCapacity would be
a compile error.
If the list lacks unused capacity for the additional items, returns
error.OutOfMemory.
Function parameters
Parameters
- self:*Self
- items:[]align(1) const T
Deprecated.
Functions
- Managed
- Deprecated.
- AlignedManaged
- Deprecated.
- Aligned
- A contiguous, growable list of arbitrarily aligned items in memory.
Source
Implementation
pub fn appendUnalignedSliceBounded(self: *Self, items: []align(1) const T) error{OutOfMemory}!void {
if (self.capacity - self.items.len < items.len) return error.OutOfMemory;
return appendUnalignedSliceAssumeCapacity(self, items);
}