pub fn initBuffer(buffer: Slice) Self
Initialize with externally-managed memory. The buffer determines the capacity, and the length is set to zero.
When initialized this way, all functions that accept an Allocator argument cause illegal behavior.
buffer: Slice
682 683 684 685 686 687 688
pub fn initBuffer(buffer: Slice) Self { return .{ .items = buffer[0..0], .capacity = buffer.len, .pointer_stability = .{}, }; }
Initialize with externally-managed memory. The buffer determines the capacity, and the length is set to zero.
When initialized this way, all functions that accept an Allocator argument cause illegal behavior.