Function initOwnedSliceAligned [src]
Prototype
pub fn initOwnedSliceAligned( allocator: Allocator, comptime alignment: std.mem.Alignment, slice: []align(alignment.toByteUnits()) u8, ) Allocating
Parameters
allocator: Allocator
alignment: std.mem.Alignment
slice: []align(alignment.toByteUnits()) u8
Source
pub fn initOwnedSliceAligned(
allocator: Allocator,
comptime alignment: std.mem.Alignment,
slice: []align(alignment.toByteUnits()) u8,
) Allocating {
return .{
.allocator = allocator,
.writer = .{
.buffer = slice,
.vtable = &vtable,
},
.alignment = alignment,
};
}