pub fn pushFrontSlice(deque: *Self, gpa: Allocator, items: []const T) error
Add items to the front of the deque. This is equivalent to iterating items in reverse and calling pushFront on every single entry.
items
pushFront
Invalidates element pointers if additional memory is needed.
deque: *Self
gpa: Allocator
items: []const T
182 183 184 185
pub fn pushFrontSlice(deque: *Self, gpa: Allocator, items: []const T) error{OutOfMemory}!void { try deque.ensureUnusedCapacity(gpa, items.len); return deque.pushFrontSliceAssumeCapacity(items); }
Add
itemsto the front of the deque. This is equivalent to iteratingitemsin reverse and callingpushFronton every single entry.Invalidates element pointers if additional memory is needed.