pub fn initBuffer(buffer: []T) Self
Initialize with externally-managed memory. The buffer determines the capacity and the deque is initially empty.
When initialized this way, all functions that accept an Allocator argument cause illegal behavior.
buffer: []T
40 41 42 43 44 45 46
pub fn initBuffer(buffer: []T) Self { return .{ .buffer = buffer, .head = 0, .len = 0, }; }
Initialize with externally-managed memory. The buffer determines the capacity and the deque is initially empty.
When initialized this way, all functions that accept an Allocator argument cause illegal behavior.