pub fn fromArrayListAligned( allocator: Allocator, comptime alignment: std.mem.Alignment, array_list: *std.array_list.Aligned(u8, alignment), ) Allocating
Replaces array_list with empty, taking ownership of the memory.
array_list
allocator: Allocator
alignment: std.mem.Alignment
array_list: *std.array_list.Aligned(u8, alignment)
2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718
pub fn fromArrayListAligned( allocator: Allocator, comptime alignment: std.mem.Alignment, array_list: *std.array_list.Aligned(u8, alignment), ) Allocating { defer array_list.* = .empty; return .{ .allocator = allocator, .writer = .{ .vtable = &vtable, .buffer = array_list.allocatedSlice(), .end = array_list.items.len, }, .alignment = alignment, }; }
Replaces
array_listwith empty, taking ownership of the memory.